aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-05-18 15:51:06 -0700
committerHaibo Huang <hhb@google.com>2020-05-18 15:51:06 -0700
commit2960bb3286f62288b139b5251c4fae8af4b229da (patch)
treef05ba22a13d80ded5528edd1bf8a9e0aa5451a51 /tests
parent6f3e9271b123f94f158b1f000c996a558351320f (diff)
downloadpin-project-2960bb3286f62288b139b5251c4fae8af4b229da.tar.gz
Upgrade rust/crates/pin-project to 0.4.17platform-tools-30.0.3platform-tools-30.0.2
Test: None Change-Id: Ief1c86f13cbb3473c76f2435a0198c7e3efbd2cf
Diffstat (limited to 'tests')
-rw-r--r--tests/pin_project.rs45
-rw-r--r--tests/ui/pin_project/conflict-naming.rs6
-rw-r--r--tests/ui/pin_project/conflict-naming.stderr21
-rw-r--r--tests/ui/pin_project/invalid.rs30
-rw-r--r--tests/ui/pin_project/invalid.stderr150
-rw-r--r--tests/ui/pin_project/visibility.rs30
-rw-r--r--tests/ui/pin_project/visibility.stderr40
-rw-r--r--tests/ui/unstable-features/trivial_bounds-bug.stderr5
-rw-r--r--tests/ui/unstable-features/trivial_bounds-feature-gate.stderr5
9 files changed, 263 insertions, 69 deletions
diff --git a/tests/pin_project.rs b/tests/pin_project.rs
index c84ca4b..72bcd15 100644
--- a/tests/pin_project.rs
+++ b/tests/pin_project.rs
@@ -9,7 +9,12 @@ use pin_project::{pin_project, pinned_drop, UnsafeUnpin};
#[test]
fn projection() {
- #[pin_project(Replace)]
+ #[pin_project(
+ Replace,
+ project = StructProj,
+ project_ref = StructProjRef,
+ project_replace = StructProjOwn,
+ )]
struct Struct<T, U> {
#[pin]
field1: T,
@@ -31,16 +36,16 @@ fn projection() {
let mut s = Struct { field1: 1, field2: 2 };
- let __StructProjection { field1, field2 } = Pin::new(&mut s).project();
+ let StructProj { field1, field2 } = Pin::new(&mut s).project();
let _: Pin<&mut i32> = field1;
let _: &mut i32 = field2;
- let __StructProjectionRef { field1, field2 } = Pin::new(&s).project_ref();
+ let StructProjRef { field1, field2 } = Pin::new(&s).project_ref();
let _: Pin<&i32> = field1;
let _: &i32 = field2;
let mut s = Pin::new(&mut s);
- let __StructProjectionOwned { field1, field2 } =
+ let StructProjOwn { field1, field2 } =
s.as_mut().project_replace(Struct { field1: 3, field2: 4 });
let _: PhantomData<i32> = field1;
let _: i32 = field2;
@@ -60,7 +65,7 @@ fn projection() {
let y: &mut i32 = s.1;
assert_eq!(*y, 2);
- #[pin_project(Replace)]
+ #[pin_project(Replace, project = EnumProj)]
#[derive(Eq, PartialEq, Debug)]
enum Enum<A, B, C, D> {
Variant1(#[pin] A, B),
@@ -77,18 +82,18 @@ fn projection() {
let e = e_orig.as_mut().project();
match e {
- __EnumProjection::Variant1(x, y) => {
+ EnumProj::Variant1(x, y) => {
let x: Pin<&mut i32> = x;
assert_eq!(*x, 1);
let y: &mut i32 = y;
assert_eq!(*y, 2);
}
- __EnumProjection::Variant2 { field1, field2 } => {
+ EnumProj::Variant2 { field1, field2 } => {
let _x: Pin<&mut i32> = field1;
let _y: &mut i32 = field2;
}
- __EnumProjection::None => {}
+ EnumProj::None => {}
}
assert_eq!(Pin::into_ref(e_orig).get_ref(), &Enum::Variant1(1, 2));
@@ -97,21 +102,21 @@ fn projection() {
let mut e = Pin::new(&mut e).project();
match &mut e {
- __EnumProjection::Variant1(x, y) => {
+ EnumProj::Variant1(x, y) => {
let _x: &mut Pin<&mut i32> = x;
let _y: &mut &mut i32 = y;
}
- __EnumProjection::Variant2 { field1, field2 } => {
+ EnumProj::Variant2 { field1, field2 } => {
let x: &mut Pin<&mut i32> = field1;
assert_eq!(**x, 3);
let y: &mut &mut i32 = field2;
assert_eq!(**y, 4);
}
- __EnumProjection::None => {}
+ EnumProj::None => {}
}
- if let __EnumProjection::Variant2 { field1, field2 } = e {
+ if let EnumProj::Variant2 { field1, field2 } = e {
let x: Pin<&mut i32> = field1;
assert_eq!(*x, 3);
@@ -122,7 +127,7 @@ fn projection() {
#[test]
fn enum_project_set() {
- #[pin_project(Replace)]
+ #[pin_project(Replace, project = EnumProj)]
#[derive(Eq, PartialEq, Debug)]
enum Enum {
Variant1(#[pin] u8),
@@ -134,7 +139,7 @@ fn enum_project_set() {
let e_proj = e_orig.as_mut().project();
match e_proj {
- __EnumProjection::Variant1(val) => {
+ EnumProj::Variant1(val) => {
let new_e = Enum::Variant2(val.as_ref().get_ref() == &25);
e_orig.set(new_e);
}
@@ -409,7 +414,7 @@ fn lifetime_project() {
unpinned: U,
}
- #[pin_project(Replace)]
+ #[pin_project(Replace, project = EnumProj, project_ref = EnumProjRef)]
enum Enum<T, U> {
Variant {
#[pin]
@@ -439,12 +444,12 @@ fn lifetime_project() {
impl<T, U> Enum<T, U> {
fn get_pin_ref<'a>(self: Pin<&'a Self>) -> Pin<&'a T> {
match self.project_ref() {
- __EnumProjectionRef::Variant { pinned, .. } => pinned,
+ EnumProjRef::Variant { pinned, .. } => pinned,
}
}
fn get_pin_mut<'a>(self: Pin<&'a mut Self>) -> Pin<&'a mut T> {
match self.project() {
- __EnumProjection::Variant { pinned, .. } => pinned,
+ EnumProj::Variant { pinned, .. } => pinned,
}
}
}
@@ -467,7 +472,7 @@ fn lifetime_project_elided() {
unpinned: U,
}
- #[pin_project(Replace)]
+ #[pin_project(Replace, project = EnumProj, project_ref = EnumProjRef)]
enum Enum<T, U> {
Variant {
#[pin]
@@ -497,12 +502,12 @@ fn lifetime_project_elided() {
impl<T, U> Enum<T, U> {
fn get_pin_ref(self: Pin<&Self>) -> Pin<&T> {
match self.project_ref() {
- __EnumProjectionRef::Variant { pinned, .. } => pinned,
+ EnumProjRef::Variant { pinned, .. } => pinned,
}
}
fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T> {
match self.project() {
- __EnumProjection::Variant { pinned, .. } => pinned,
+ EnumProj::Variant { pinned, .. } => pinned,
}
}
}
diff --git a/tests/ui/pin_project/conflict-naming.rs b/tests/ui/pin_project/conflict-naming.rs
new file mode 100644
index 0000000..1cb50b4
--- /dev/null
+++ b/tests/ui/pin_project/conflict-naming.rs
@@ -0,0 +1,6 @@
+use pin_project::pin_project;
+
+#[pin_project(project = A, project_ref = A)] //~ ERROR E0428,E0308
+struct Struct(#[pin] ());
+
+fn main() {}
diff --git a/tests/ui/pin_project/conflict-naming.stderr b/tests/ui/pin_project/conflict-naming.stderr
new file mode 100644
index 0000000..bbac1eb
--- /dev/null
+++ b/tests/ui/pin_project/conflict-naming.stderr
@@ -0,0 +1,21 @@
+error[E0428]: the name `A` is defined multiple times
+ --> $DIR/conflict-naming.rs:3:1
+ |
+3 | #[pin_project(project = A, project_ref = A)] //~ ERROR E0428,E0308
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | |
+ | `A` redefined here
+ | previous definition of the type `A` here
+ |
+ = note: `A` must be defined only once in the type namespace of this module
+ = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0308]: mismatched types
+ --> $DIR/conflict-naming.rs:3:1
+ |
+3 | #[pin_project(project = A, project_ref = A)] //~ ERROR E0428,E0308
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability
+ |
+ = note: expected mutable reference `&mut ()`
+ found reference `&()`
+ = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/pin_project/invalid.rs b/tests/ui/pin_project/invalid.rs
index 1d05608..d7911df 100644
--- a/tests/ui/pin_project/invalid.rs
+++ b/tests/ui/pin_project/invalid.rs
@@ -118,6 +118,18 @@ mod pin_project_argument {
#[pin_project(PinnedDrop, UnsafeUnpin, PinnedDrop, UnsafeUnpin)] //~ ERROR duplicate `PinnedDrop` argument
struct Duplicate4(#[pin] ());
+ #[pin_project(project = A, project = B)] //~ ERROR duplicate `project` argument
+ struct DuplicateProject(#[pin] ());
+
+ #[pin_project(project_ref = A, project_ref = B)] //~ ERROR duplicate `project_ref` argument
+ struct DuplicateProjectRef(#[pin] ());
+
+ #[pin_project(project_replace = A, project_replace = B)] //~ ERROR duplicate `project_replace` argument
+ struct DuplicateProjectReplace(#[pin] ());
+
+ #[pin_project(project_replace = A)] //~ ERROR `project_replace` argument can only be used together with `Replace` argument
+ struct ProjectReplaceWithoutReplace(#[pin] ());
+
#[pin_project(PinnedDrop, Replace)] //~ ERROR arguments `PinnedDrop` and `Replace` are mutually exclusive
struct PinnedDropWithReplace1(#[pin] ());
@@ -135,6 +147,24 @@ mod pin_project_argument {
#[pin_project(Unpin)] //~ ERROR unexpected argument
struct NotUnpin2(#[pin] ());
+
+ #[pin_project(project)] //~ ERROR expected `=`
+ struct Project1(#[pin] ());
+
+ #[pin_project(project = )] //~ ERROR unexpected end of input, expected identifier
+ struct Project2(#[pin] ());
+
+ #[pin_project(project_ref)] //~ ERROR expected `=`
+ struct ProjectRef1(#[pin] ());
+
+ #[pin_project(project_ref = )] //~ ERROR unexpected end of input, expected identifier
+ struct ProjectRef2(#[pin] ());
+
+ #[pin_project(project_replace)] //~ ERROR expected `=`
+ struct ProjectReplace1(#[pin] ());
+
+ #[pin_project(project_replace = )] //~ ERROR unexpected end of input, expected identifier
+ struct ProjectReplace2(#[pin] ());
}
mod pin_project_attribute {
diff --git a/tests/ui/pin_project/invalid.stderr b/tests/ui/pin_project/invalid.stderr
index 95b57f0..82026aa 100644
--- a/tests/ui/pin_project/invalid.stderr
+++ b/tests/ui/pin_project/invalid.stderr
@@ -118,111 +118,183 @@ error: duplicate `PinnedDrop` argument
118 | #[pin_project(PinnedDrop, UnsafeUnpin, PinnedDrop, UnsafeUnpin)] //~ ERROR duplicate `PinnedDrop` argument
| ^^^^^^^^^^
+error: duplicate `project` argument
+ --> $DIR/invalid.rs:121:32
+ |
+121 | #[pin_project(project = A, project = B)] //~ ERROR duplicate `project` argument
+ | ^^^^^^^
+
+error: duplicate `project_ref` argument
+ --> $DIR/invalid.rs:124:36
+ |
+124 | #[pin_project(project_ref = A, project_ref = B)] //~ ERROR duplicate `project_ref` argument
+ | ^^^^^^^^^^^
+
+error: duplicate `project_replace` argument
+ --> $DIR/invalid.rs:127:40
+ |
+127 | #[pin_project(project_replace = A, project_replace = B)] //~ ERROR duplicate `project_replace` argument
+ | ^^^^^^^^^^^^^^^
+
+error: `project_replace` argument can only be used together with `Replace` argument
+ --> $DIR/invalid.rs:130:19
+ |
+130 | #[pin_project(project_replace = A)] //~ ERROR `project_replace` argument can only be used together with `Replace` argument
+ | ^^^^^^^^^^^^^^^
+
error: arguments `PinnedDrop` and `Replace` are mutually exclusive
- --> $DIR/invalid.rs:121:19
+ --> $DIR/invalid.rs:133:19
|
-121 | #[pin_project(PinnedDrop, Replace)] //~ ERROR arguments `PinnedDrop` and `Replace` are mutually exclusive
+133 | #[pin_project(PinnedDrop, Replace)] //~ ERROR arguments `PinnedDrop` and `Replace` are mutually exclusive
| ^^^^^^^^^^
error: arguments `PinnedDrop` and `Replace` are mutually exclusive
- --> $DIR/invalid.rs:124:41
+ --> $DIR/invalid.rs:136:41
|
-124 | #[pin_project(Replace, UnsafeUnpin, PinnedDrop)] //~ ERROR arguments `PinnedDrop` and `Replace` are mutually exclusive
+136 | #[pin_project(Replace, UnsafeUnpin, PinnedDrop)] //~ ERROR arguments `PinnedDrop` and `Replace` are mutually exclusive
| ^^^^^^^^^^
error: arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
- --> $DIR/invalid.rs:127:19
+ --> $DIR/invalid.rs:139:19
|
-127 | #[pin_project(UnsafeUnpin, !Unpin)] //~ ERROR arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
+139 | #[pin_project(UnsafeUnpin, !Unpin)] //~ ERROR arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
| ^^^^^^^^^^^
error: arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
- --> $DIR/invalid.rs:130:39
+ --> $DIR/invalid.rs:142:39
|
-130 | #[pin_project(!Unpin, PinnedDrop, UnsafeUnpin)] //~ ERROR arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
+142 | #[pin_project(!Unpin, PinnedDrop, UnsafeUnpin)] //~ ERROR arguments `UnsafeUnpin` and `!Unpin` are mutually exclusive
| ^^^^^^^^^^^
error: unexpected end of input, expected `Unpin`
- --> $DIR/invalid.rs:133:5
+ --> $DIR/invalid.rs:145:5
|
-133 | #[pin_project(!)] //~ ERROR unexpected end of input, expected `Unpin`
+145 | #[pin_project(!)] //~ ERROR unexpected end of input, expected `Unpin`
| ^^^^^^^^^^^^^^^^^
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected argument: Unpin
- --> $DIR/invalid.rs:136:19
+ --> $DIR/invalid.rs:148:19
|
-136 | #[pin_project(Unpin)] //~ ERROR unexpected argument
+148 | #[pin_project(Unpin)] //~ ERROR unexpected argument
| ^^^^^
+error: expected `=`
+ --> $DIR/invalid.rs:151:5
+ |
+151 | #[pin_project(project)] //~ ERROR expected `=`
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: unexpected end of input, expected identifier
+ --> $DIR/invalid.rs:154:5
+ |
+154 | #[pin_project(project = )] //~ ERROR unexpected end of input, expected identifier
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: expected `=`
+ --> $DIR/invalid.rs:157:5
+ |
+157 | #[pin_project(project_ref)] //~ ERROR expected `=`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: unexpected end of input, expected identifier
+ --> $DIR/invalid.rs:160:5
+ |
+160 | #[pin_project(project_ref = )] //~ ERROR unexpected end of input, expected identifier
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: expected `=`
+ --> $DIR/invalid.rs:163:5
+ |
+163 | #[pin_project(project_replace)] //~ ERROR expected `=`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: unexpected end of input, expected identifier
+ --> $DIR/invalid.rs:166:5
+ |
+166 | #[pin_project(project_replace = )] //~ ERROR unexpected end of input, expected identifier
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
+
error: duplicate #[pin_project] attribute
- --> $DIR/invalid.rs:144:5
+ --> $DIR/invalid.rs:174:5
|
-144 | #[pin_project] //~ ERROR duplicate #[pin_project] attribute
+174 | #[pin_project] //~ ERROR duplicate #[pin_project] attribute
| ^^^^^^^^^^^^^^
error: #[pin_project] attribute may not be used on structs with zero fields
- --> $DIR/invalid.rs:152:19
+ --> $DIR/invalid.rs:182:19
|
-152 | struct Struct {} //~ ERROR may not be used on structs with zero fields
+182 | struct Struct {} //~ ERROR may not be used on structs with zero fields
| ^^
error: #[pin_project] attribute may not be used on structs with zero fields
- --> $DIR/invalid.rs:155:23
+ --> $DIR/invalid.rs:185:23
|
-155 | struct TupleStruct(); //~ ERROR may not be used on structs with zero fields
+185 | struct TupleStruct(); //~ ERROR may not be used on structs with zero fields
| ^^
error: #[pin_project] attribute may not be used on structs with zero fields
- --> $DIR/invalid.rs:158:12
+ --> $DIR/invalid.rs:188:12
|
-158 | struct UnitStruct; //~ ERROR may not be used on structs with zero fields
+188 | struct UnitStruct; //~ ERROR may not be used on structs with zero fields
| ^^^^^^^^^^
error: #[pin_project] attribute may not be used on enums without variants
- --> $DIR/invalid.rs:161:20
+ --> $DIR/invalid.rs:191:20
|
-161 | enum EnumEmpty {} //~ ERROR may not be used on enums without variants
+191 | enum EnumEmpty {} //~ ERROR may not be used on enums without variants
| ^^
error: #[pin_project] attribute may not be used on enums with discriminants
- --> $DIR/invalid.rs:165:13
+ --> $DIR/invalid.rs:195:13
|
-165 | V = 2, //~ ERROR may not be used on enums with discriminants
+195 | V = 2, //~ ERROR may not be used on enums with discriminants
| ^
error: #[pin_project] attribute may not be used on enums with zero fields
- --> $DIR/invalid.rs:170:9
+ --> $DIR/invalid.rs:200:9
|
-170 | / Unit, //~ ERROR may not be used on enums with zero fields
-171 | | Tuple(),
-172 | | Struct {},
+200 | / Unit, //~ ERROR may not be used on enums with zero fields
+201 | | Tuple(),
+202 | | Struct {},
| |__________________^
error: #[pin_project] attribute may only be used on structs or enums
- --> $DIR/invalid.rs:176:5
+ --> $DIR/invalid.rs:206:5
|
-176 | / union Union {
-177 | | //~^ ERROR may only be used on structs or enums
-178 | | f: (),
-179 | | }
+206 | / union Union {
+207 | | //~^ ERROR may only be used on structs or enums
+208 | | f: (),
+209 | | }
| |_____^
error: #[pin_project] attribute may not be used on #[repr(packed)] types
- --> $DIR/invalid.rs:187:12
+ --> $DIR/invalid.rs:217:12
|
-187 | #[repr(packed)]
+217 | #[repr(packed)]
| ^^^^^^
error: #[pin_project] attribute may not be used on #[repr(packed)] types
- --> $DIR/invalid.rs:191:12
+ --> $DIR/invalid.rs:221:12
|
-191 | #[repr(packed)]
+221 | #[repr(packed)]
| ^^^^^^
error: #[pin_project] attribute may not be used on #[repr(packed)] types
- --> $DIR/invalid.rs:195:12
+ --> $DIR/invalid.rs:225:12
|
-195 | #[repr(packed)]
+225 | #[repr(packed)]
| ^^^^^^
diff --git a/tests/ui/pin_project/visibility.rs b/tests/ui/pin_project/visibility.rs
index 4f0cb1b..7dce6ab 100644
--- a/tests/ui/pin_project/visibility.rs
+++ b/tests/ui/pin_project/visibility.rs
@@ -49,4 +49,34 @@ pub mod pub_crate_use {
};
}
+mod pub_renamed {
+ use pin_project::pin_project;
+
+ #[pin_project(project = DProj, project_ref = DProjRef)]
+ pub struct Default(());
+
+ #[pin_project(Replace, project = RProj, project_ref = RProjRef, project_replace = RProjOwn)]
+ pub struct Replace(());
+}
+pub mod pub_renamed_use {
+ #[rustfmt::skip]
+ pub use crate::pub_renamed::DProj; //~ ERROR E0365
+ #[rustfmt::skip]
+ pub use crate::pub_renamed::DProjRef; //~ ERROR E0365
+ #[rustfmt::skip]
+ pub use crate::pub_renamed::RProj; //~ ERROR E0365
+ #[rustfmt::skip]
+ pub use crate::pub_renamed::RProjOwn; //~ ERROR E0365
+ #[rustfmt::skip]
+ pub use crate::pub_renamed::RProjRef; //~ ERROR E0365
+
+ // Confirm that the visibility of the original type is not changed.
+ pub use crate::pub_renamed::{Default, Replace};
+}
+pub mod pub_renamed_use2 {
+ // Ok
+ #[allow(unused_imports)]
+ pub(crate) use crate::pub_renamed::{DProj, DProjRef, RProj, RProjOwn, RProjRef};
+}
+
fn main() {}
diff --git a/tests/ui/pin_project/visibility.stderr b/tests/ui/pin_project/visibility.stderr
index 1ea60d7..cab0e2e 100644
--- a/tests/ui/pin_project/visibility.stderr
+++ b/tests/ui/pin_project/visibility.stderr
@@ -37,3 +37,43 @@ error[E0365]: `__ReplaceProjectionRef` is private, and cannot be re-exported
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ re-export of private `__ReplaceProjectionRef`
|
= note: consider declaring type or module `__ReplaceProjectionRef` with `pub`
+
+error[E0365]: `DProj` is private, and cannot be re-exported
+ --> $DIR/visibility.rs:63:13
+ |
+63 | pub use crate::pub_renamed::DProj; //~ ERROR E0365
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ re-export of private `DProj`
+ |
+ = note: consider declaring type or module `DProj` with `pub`
+
+error[E0365]: `DProjRef` is private, and cannot be re-exported
+ --> $DIR/visibility.rs:65:13
+ |
+65 | pub use crate::pub_renamed::DProjRef; //~ ERROR E0365
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ re-export of private `DProjRef`
+ |
+ = note: consider declaring type or module `DProjRef` with `pub`
+
+error[E0365]: `RProj` is private, and cannot be re-exported
+ --> $DIR/visibility.rs:67:13
+ |
+67 | pub use crate::pub_renamed::RProj; //~ ERROR E0365
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ re-export of private `RProj`
+ |
+ = note: consider declaring type or module `RProj` with `pub`
+
+error[E0365]: `RProjOwn` is private, and cannot be re-exported
+ --> $DIR/visibility.rs:69:13
+ |
+69 | pub use crate::pub_renamed::RProjOwn; //~ ERROR E0365
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ re-export of private `RProjOwn`
+ |
+ = note: consider declaring type or module `RProjOwn` with `pub`
+
+error[E0365]: `RProjRef` is private, and cannot be re-exported
+ --> $DIR/visibility.rs:71:13
+ |
+71 | pub use crate::pub_renamed::RProjRef; //~ ERROR E0365
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ re-export of private `RProjRef`
+ |
+ = note: consider declaring type or module `RProjRef` with `pub`
diff --git a/tests/ui/unstable-features/trivial_bounds-bug.stderr b/tests/ui/unstable-features/trivial_bounds-bug.stderr
index 7ddf10c..8370c45 100644
--- a/tests/ui/unstable-features/trivial_bounds-bug.stderr
+++ b/tests/ui/unstable-features/trivial_bounds-bug.stderr
@@ -3,8 +3,3 @@ error[E0277]: `std::marker::PhantomPinned` cannot be unpinned
|
13 | impl Unpin for A where PhantomPinned: Unpin {} //~ ERROR E0277
| ^^^^^ the trait `std::marker::Unpin` is not implemented for `std::marker::PhantomPinned`
- |
- ::: /Users/taiki/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore/marker.rs:736:1
- |
-736 | pub auto trait Unpin {}
- | -------------------- required by this bound in `std::marker::Unpin`
diff --git a/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr b/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr
index 31196a2..70450dc 100644
--- a/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr
+++ b/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr
@@ -12,11 +12,6 @@ error[E0277]: `std::marker::PhantomPinned` cannot be unpinned
|
8 | impl Unpin for A where PhantomPinned: Unpin {} //~ ERROR E0277
| ^^^^^ the trait `std::marker::Unpin` is not implemented for `std::marker::PhantomPinned`
- |
- ::: /Users/taiki/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore/marker.rs:736:1
- |
-736 | pub auto trait Unpin {}
- | -------------------- required by this bound in `std::marker::Unpin`
error[E0277]: `std::marker::PhantomPinned` cannot be unpinned
--> $DIR/trivial_bounds-feature-gate.rs:16:5