diff options
author | Joel Galenson <jgalenson@google.com> | 2021-08-09 10:36:36 -0700 |
---|---|---|
committer | Joel Galenson <jgalenson@google.com> | 2021-08-09 10:36:36 -0700 |
commit | c1569cc62c4d1c5daf604922102c09fed8a91eb4 (patch) | |
tree | 4ff684b6890583131074a1033210f0ac7abb1d0d /tests/ui | |
parent | b845c5fd84f50f28cd5cce350eac405562744e3b (diff) | |
download | pin-project-c1569cc62c4d1c5daf604922102c09fed8a91eb4.tar.gz |
Upgrade rust/crates/pin-project to 1.0.8android-s-beta-5android-s-beta-5
Test: make
Change-Id: I5d34b05966fb665ac1d6a09229743a24d6927742
Diffstat (limited to 'tests/ui')
22 files changed, 189 insertions, 123 deletions
diff --git a/tests/ui/not_unpin/impl-unsafe-unpin.stderr b/tests/ui/not_unpin/impl-unsafe-unpin.stderr index 43cd4f1..7051bd8 100644 --- a/tests/ui/not_unpin/impl-unsafe-unpin.stderr +++ b/tests/ui/not_unpin/impl-unsafe-unpin.stderr @@ -7,7 +7,7 @@ error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` fo 10 | unsafe impl<T, U> UnsafeUnpin for Foo<T, U> where T: Unpin {} | ---------------------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` for type `Bar<_, _>` --> $DIR/impl-unsafe-unpin.rs:12:1 @@ -18,7 +18,7 @@ error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` fo 19 | unsafe impl<T, U> UnsafeUnpin for Bar<T, U> {} | ------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` for type `Baz<_, _>` --> $DIR/impl-unsafe-unpin.rs:21:1 @@ -29,4 +29,4 @@ error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` fo 28 | unsafe impl<T: Unpin, U: Unpin> UnsafeUnpin for Baz<T, U> {} | --------------------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/add-attr-to-struct.stderr b/tests/ui/pin_project/add-attr-to-struct.stderr index f3ee9e4..b28559b 100644 --- a/tests/ui/pin_project/add-attr-to-struct.stderr +++ b/tests/ui/pin_project/add-attr-to-struct.stderr @@ -4,7 +4,7 @@ error: duplicate #[pin] attribute 7 | #[add_pin_attr(struct)] //~ ERROR duplicate #[pin] attribute | ^^^^^^^^^^^^^^^^^^^^^^^ | - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `add_pin_attr` (in Nightly builds, run with -Z macro-backtrace for more info) error: #[pin] attribute may only be used on fields of structs or variants --> $DIR/add-attr-to-struct.rs:13:1 @@ -12,4 +12,4 @@ error: #[pin] attribute may only be used on fields of structs or variants 13 | #[add_pin_attr(struct)] //~ ERROR #[pin] attribute may only be used on fields of structs or variants | ^^^^^^^^^^^^^^^^^^^^^^^ | - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `add_pin_attr` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/add-pinned-field.stderr b/tests/ui/pin_project/add-pinned-field.stderr index a391f3b..bdeafb8 100644 --- a/tests/ui/pin_project/add-pinned-field.stderr +++ b/tests/ui/pin_project/add-pinned-field.stderr @@ -13,7 +13,15 @@ note: required because it appears within the type `__Foo<'_>` | 8 | struct Foo { | ^^^ - = note: required because of the requirements on the impl of `Unpin` for `Foo` +note: required because of the requirements on the impl of `Unpin` for `Foo` + --> $DIR/add-pinned-field.rs:6:1 + | +6 | #[pin_project] + | ^^^^^^^^^^^^^^ +7 | #[add_pinned_field] +8 | struct Foo { + | ^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `PhantomPinned` cannot be unpinned --> $DIR/add-pinned-field.rs:22:5 @@ -30,4 +38,11 @@ note: required because it appears within the type `__Bar<'_>` | 15 | struct Bar { | ^^^ - = note: required because of the requirements on the impl of `Unpin` for `Bar` +note: required because of the requirements on the impl of `Unpin` for `Bar` + --> $DIR/add-pinned-field.rs:14:1 + | +14 | #[pin_project] + | ^^^^^^^^^^^^^^ +15 | struct Bar { + | ^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/conflict-drop.stderr b/tests/ui/pin_project/conflict-drop.stderr index ae51456..25b0e00 100644 --- a/tests/ui/pin_project/conflict-drop.stderr +++ b/tests/ui/pin_project/conflict-drop.stderr @@ -7,7 +7,7 @@ error[E0119]: conflicting implementations of trait `_::FooMustNotImplDrop` for t | first implementation here | conflicting implementation for `Foo<_, _>` | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `std::ops::Drop` for type `Bar<_, _>` --> $DIR/conflict-drop.rs:16:15 diff --git a/tests/ui/pin_project/conflict-unpin.stderr b/tests/ui/pin_project/conflict-unpin.stderr index 0401140..5a16469 100644 --- a/tests/ui/pin_project/conflict-unpin.stderr +++ b/tests/ui/pin_project/conflict-unpin.stderr @@ -7,7 +7,7 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 13 | impl<T, U> Unpin for Foo<T, U> where T: Unpin {} // Conditional Unpin impl | --------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Bar<_, _>` --> $DIR/conflict-unpin.rs:17:1 @@ -18,7 +18,7 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 25 | impl<T, U> Unpin for Bar<T, U> {} // Non-conditional Unpin impl | ------------------------------ first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Baz<_, _>` --> $DIR/conflict-unpin.rs:27:1 @@ -29,4 +29,4 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 35 | impl<T: Unpin, U: Unpin> Unpin for Baz<T, U> {} // Conditional Unpin impl | -------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/impl-unsafe-unpin.stderr b/tests/ui/pin_project/impl-unsafe-unpin.stderr index 078baee..e97d31b 100644 --- a/tests/ui/pin_project/impl-unsafe-unpin.stderr +++ b/tests/ui/pin_project/impl-unsafe-unpin.stderr @@ -7,7 +7,7 @@ error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` fo 10 | unsafe impl<T, U> UnsafeUnpin for Foo<T, U> where T: Unpin {} | ---------------------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` for type `Bar<_, _>` --> $DIR/impl-unsafe-unpin.rs:12:1 @@ -18,7 +18,7 @@ error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` fo 19 | unsafe impl<T, U> UnsafeUnpin for Bar<T, U> {} | ------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` for type `Baz<_, _>` --> $DIR/impl-unsafe-unpin.rs:21:1 @@ -29,4 +29,4 @@ error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` fo 28 | unsafe impl<T: Unpin, U: Unpin> UnsafeUnpin for Baz<T, U> {} | --------------------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/overlapping_unpin_struct.stderr b/tests/ui/pin_project/overlapping_unpin_struct.stderr index f49c736..bb33944 100644 --- a/tests/ui/pin_project/overlapping_unpin_struct.stderr +++ b/tests/ui/pin_project/overlapping_unpin_struct.stderr @@ -13,4 +13,11 @@ note: required because it appears within the type `_::__S<'_, PhantomPinned>` | 6 | struct S<T> { | ^ - = note: required because of the requirements on the impl of `Unpin` for `S<PhantomPinned>` +note: required because of the requirements on the impl of `Unpin` for `S<PhantomPinned>` + --> $DIR/overlapping_unpin_struct.rs:5:1 + | +5 | #[pin_project] + | ^^^^^^^^^^^^^^ +6 | struct S<T> { + | ^^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/packed-name-value.stderr b/tests/ui/pin_project/packed-name-value.stderr index 51b82dd..18137d4 100644 --- a/tests/ui/pin_project/packed-name-value.stderr +++ b/tests/ui/pin_project/packed-name-value.stderr @@ -9,3 +9,15 @@ error: #[repr(packed)] attribute should not be name-value pair | 21 | #[repr(packed = "")] //~ ERROR attribute should not be name-value pair | ^^^^^^^^^^^ + +error[E0693]: incorrect `repr(packed)` attribute format + --> $DIR/packed-name-value.rs:16:8 + | +16 | #[repr(packed = "")] //~ ERROR attribute should not be name-value pair + | ^^^^^^^^^^^ help: use parentheses instead: `packed()` + +error[E0693]: incorrect `repr(packed)` attribute format + --> $DIR/packed-name-value.rs:21:8 + | +21 | #[repr(packed = "")] //~ ERROR attribute should not be name-value pair + | ^^^^^^^^^^^ help: use parentheses instead: `packed()` diff --git a/tests/ui/pin_project/packed_sneaky-2.stderr b/tests/ui/pin_project/packed_sneaky-2.stderr index 51987a2..04d072a 100644 --- a/tests/ui/pin_project/packed_sneaky-2.stderr +++ b/tests/ui/pin_project/packed_sneaky-2.stderr @@ -10,4 +10,4 @@ error: #[pin_project] attribute may not be used on #[repr(packed)] types 10 | | } | |_^ | - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `hidden_repr_macro` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/packed_sneaky-3.stderr b/tests/ui/pin_project/packed_sneaky-3.stderr index b953e9f..1a5a3ec 100644 --- a/tests/ui/pin_project/packed_sneaky-3.stderr +++ b/tests/ui/pin_project/packed_sneaky-3.stderr @@ -4,7 +4,7 @@ error: expected item after attributes 4 | hidden_repr_macro! {} //~ ERROR expected item after attributes | ^^^^^^^^^^^^^^^^^^^^^ | - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `hidden_repr_macro` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected item after attributes --> $DIR/packed_sneaky-3.rs:13:9 @@ -15,7 +15,7 @@ error: expected item after attributes 17 | hidden_repr_macro2! {} | ---------------------- in this macro invocation | - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `hidden_repr_macro2` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected item after attributes --> $DIR/packed_sneaky-3.rs:24:10 @@ -23,7 +23,7 @@ error: expected item after attributes 24 | #[derive(HiddenRepr)] //~ ERROR expected item after attributes | ^^^^^^^^^^ | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `HiddenRepr` (in Nightly builds, run with -Z macro-backtrace for more info) error: proc-macro derive produced unparseable tokens --> $DIR/packed_sneaky-3.rs:24:10 diff --git a/tests/ui/pin_project/project_replace_unsized.stderr b/tests/ui/pin_project/project_replace_unsized.stderr index 75a2666..d20d858 100644 --- a/tests/ui/pin_project/project_replace_unsized.stderr +++ b/tests/ui/pin_project/project_replace_unsized.stderr @@ -18,20 +18,24 @@ help: function arguments must have a statically known size, borrowed types alway | ^ error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized.rs:3:1 - | -3 | #[pin_project(project_replace)] //~ ERROR E0277 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time -4 | struct Struct<T: ?Sized> { - | - this type parameter needs to be `std::marker::Sized` - | + --> $DIR/project_replace_unsized.rs:3:1 + | +3 | #[pin_project(project_replace)] //~ ERROR E0277 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time +4 | struct Struct<T: ?Sized> { + | - this type parameter needs to be `std::marker::Sized` + | note: required because it appears within the type `Struct<T>` - --> $DIR/project_replace_unsized.rs:4:8 - | -4 | struct Struct<T: ?Sized> { - | ^^^^^^ - = note: required by `UnsafeOverwriteGuard` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + --> $DIR/project_replace_unsized.rs:4:8 + | +4 | struct Struct<T: ?Sized> { + | ^^^^^^ +note: required by `UnsafeOverwriteGuard` + --> $DIR/lib.rs:269:5 + | +269 | pub struct UnsafeOverwriteGuard<T> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized.rs:5:5 @@ -61,20 +65,24 @@ help: function arguments must have a statically known size, borrowed types alway | ^ error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized.rs:8:1 - | -8 | #[pin_project(project_replace)] //~ ERROR E0277 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time -9 | struct TupleStruct<T: ?Sized>(T); - | - this type parameter needs to be `std::marker::Sized` - | + --> $DIR/project_replace_unsized.rs:8:1 + | +8 | #[pin_project(project_replace)] //~ ERROR E0277 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time +9 | struct TupleStruct<T: ?Sized>(T); + | - this type parameter needs to be `std::marker::Sized` + | note: required because it appears within the type `TupleStruct<T>` - --> $DIR/project_replace_unsized.rs:9:8 - | -9 | struct TupleStruct<T: ?Sized>(T); - | ^^^^^^^^^^^ - = note: required by `UnsafeOverwriteGuard` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + --> $DIR/project_replace_unsized.rs:9:8 + | +9 | struct TupleStruct<T: ?Sized>(T); + | ^^^^^^^^^^^ +note: required by `UnsafeOverwriteGuard` + --> $DIR/lib.rs:269:5 + | +269 | pub struct UnsafeOverwriteGuard<T> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized.rs:9:8 diff --git a/tests/ui/pin_project/project_replace_unsized_fn_params.stderr b/tests/ui/pin_project/project_replace_unsized_fn_params.stderr index f8cee98..8ac4ad7 100644 --- a/tests/ui/pin_project/project_replace_unsized_fn_params.stderr +++ b/tests/ui/pin_project/project_replace_unsized_fn_params.stderr @@ -15,20 +15,24 @@ note: required because it appears within the type `__StructProjectionOwned<T>` = note: the return type of a function must have a statically known size error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized_fn_params.rs:5:1 - | -5 | #[pin_project(project_replace)] //~ ERROR E0277 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time -6 | struct Struct<T: ?Sized> { - | - this type parameter needs to be `std::marker::Sized` - | + --> $DIR/project_replace_unsized_fn_params.rs:5:1 + | +5 | #[pin_project(project_replace)] //~ ERROR E0277 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time +6 | struct Struct<T: ?Sized> { + | - this type parameter needs to be `std::marker::Sized` + | note: required because it appears within the type `Struct<T>` - --> $DIR/project_replace_unsized_fn_params.rs:6:8 - | -6 | struct Struct<T: ?Sized> { - | ^^^^^^ - = note: required by `UnsafeOverwriteGuard` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + --> $DIR/project_replace_unsized_fn_params.rs:6:8 + | +6 | struct Struct<T: ?Sized> { + | ^^^^^^ +note: required by `UnsafeOverwriteGuard` + --> $DIR/lib.rs:269:5 + | +269 | pub struct UnsafeOverwriteGuard<T> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized_fn_params.rs:7:5 @@ -55,17 +59,21 @@ note: required because it appears within the type `__TupleStructProjectionOwned< = note: the return type of a function must have a statically known size error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized_fn_params.rs:10:1 - | -10 | #[pin_project(project_replace)] //~ ERROR E0277 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time -11 | struct TupleStruct<T: ?Sized>(T); - | - this type parameter needs to be `std::marker::Sized` - | + --> $DIR/project_replace_unsized_fn_params.rs:10:1 + | +10 | #[pin_project(project_replace)] //~ ERROR E0277 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time +11 | struct TupleStruct<T: ?Sized>(T); + | - this type parameter needs to be `std::marker::Sized` + | note: required because it appears within the type `TupleStruct<T>` - --> $DIR/project_replace_unsized_fn_params.rs:11:8 - | -11 | struct TupleStruct<T: ?Sized>(T); - | ^^^^^^^^^^^ - = note: required by `UnsafeOverwriteGuard` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + --> $DIR/project_replace_unsized_fn_params.rs:11:8 + | +11 | struct TupleStruct<T: ?Sized>(T); + | ^^^^^^^^^^^ +note: required by `UnsafeOverwriteGuard` + --> $DIR/lib.rs:269:5 + | +269 | pub struct UnsafeOverwriteGuard<T> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/remove-attr-from-struct.stderr b/tests/ui/pin_project/remove-attr-from-struct.stderr index 82fada5..57cf21d 100644 --- a/tests/ui/pin_project/remove-attr-from-struct.stderr +++ b/tests/ui/pin_project/remove-attr-from-struct.stderr @@ -4,7 +4,7 @@ error: #[pin_project] attribute has been removed 22 | #[pin_project] //~ ERROR has been removed | ^^^^^^^^^^^^^^ | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find attribute `pin` in this scope --> $DIR/remove-attr-from-struct.rs:18:7 @@ -51,18 +51,18 @@ note: required because it appears within the type `B` | ^ error[E0277]: `PhantomPinned` cannot be unpinned - --> $DIR/remove-attr-from-struct.rs:40:13 - | -40 | let _ = Pin::new(&mut x).project(); //~ ERROR E0277,E0599 - | ^^^^^^^^ within `A`, the trait `Unpin` is not implemented for `PhantomPinned` - | - = note: consider using `Box::pin` + --> $DIR/remove-attr-from-struct.rs:40:13 + | +40 | let _ = Pin::new(&mut x).project(); //~ ERROR E0277,E0599 + | ^^^^^^^^ within `A`, the trait `Unpin` is not implemented for `PhantomPinned` + | + = note: consider using `Box::pin` note: required because it appears within the type `A` - --> $DIR/remove-attr-from-struct.rs:10:8 - | -10 | struct A { - | ^ - = note: required by `Pin::<P>::new` + --> $DIR/remove-attr-from-struct.rs:10:8 + | +10 | struct A { + | ^ +note: required by `Pin::<P>::new` error[E0599]: no method named `project` found for struct `Pin<&mut A>` in the current scope --> $DIR/remove-attr-from-struct.rs:40:30 @@ -71,18 +71,18 @@ error[E0599]: no method named `project` found for struct `Pin<&mut A>` in the cu | ^^^^^^^ method not found in `Pin<&mut A>` error[E0277]: `PhantomPinned` cannot be unpinned - --> $DIR/remove-attr-from-struct.rs:43:13 - | -43 | let _ = Pin::new(&mut x).project(); //~ ERROR E0277,E0599 - | ^^^^^^^^ within `B`, the trait `Unpin` is not implemented for `PhantomPinned` - | - = note: consider using `Box::pin` + --> $DIR/remove-attr-from-struct.rs:43:13 + | +43 | let _ = Pin::new(&mut x).project(); //~ ERROR E0277,E0599 + | ^^^^^^^^ within `B`, the trait `Unpin` is not implemented for `PhantomPinned` + | + = note: consider using `Box::pin` note: required because it appears within the type `B` - --> $DIR/remove-attr-from-struct.rs:17:8 - | -17 | struct B { - | ^ - = note: required by `Pin::<P>::new` + --> $DIR/remove-attr-from-struct.rs:17:8 + | +17 | struct B { + | ^ +note: required by `Pin::<P>::new` error[E0599]: no method named `project` found for struct `Pin<&mut B>` in the current scope --> $DIR/remove-attr-from-struct.rs:43:30 diff --git a/tests/ui/pinned_drop/call-drop-inner.stderr b/tests/ui/pinned_drop/call-drop-inner.stderr index 463e837..8fbe2dc 100644 --- a/tests/ui/pinned_drop/call-drop-inner.stderr +++ b/tests/ui/pinned_drop/call-drop-inner.stderr @@ -11,4 +11,4 @@ note: function defined here | 10 | #[pinned_drop] | ^^^^^^^^^^^^^^ - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `pinned_drop` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pinned_drop/conditional-drop-impl.stderr b/tests/ui/pinned_drop/conditional-drop-impl.stderr index 8ab2294..a512578 100644 --- a/tests/ui/pinned_drop/conditional-drop-impl.stderr +++ b/tests/ui/pinned_drop/conditional-drop-impl.stderr @@ -13,19 +13,23 @@ note: the implementor must specify the same requirement | |_^ error[E0277]: `T` cannot be unpinned - --> $DIR/conditional-drop-impl.rs:16:15 - | -16 | #[pin_project(PinnedDrop)] //~ ERROR E0277 - | ^^^^^^^^^^ the trait `Unpin` is not implemented for `T` - | - = note: consider using `Box::pin` + --> $DIR/conditional-drop-impl.rs:16:15 + | +16 | #[pin_project(PinnedDrop)] //~ ERROR E0277 + | ^^^^^^^^^^ the trait `Unpin` is not implemented for `T` + | + = note: consider using `Box::pin` note: required because of the requirements on the impl of `PinnedDrop` for `PinnedDropImpl<T>` - --> $DIR/conditional-drop-impl.rs:23:16 - | -23 | impl<T: Unpin> PinnedDrop for PinnedDropImpl<T> { - | ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ - = note: required by `pin_project::__private::PinnedDrop::drop` + --> $DIR/conditional-drop-impl.rs:23:16 + | +23 | impl<T: Unpin> PinnedDrop for PinnedDropImpl<T> { + | ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ +note: required by `pin_project::__private::PinnedDrop::drop` + --> $DIR/lib.rs:186:9 + | +186 | unsafe fn drop(self: Pin<&mut Self>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider restricting type parameter `T` - | -17 | struct PinnedDropImpl<T: std::marker::Unpin> { - | ^^^^^^^^^^^^^^^^^^^^ + | +17 | struct PinnedDropImpl<T: std::marker::Unpin> { + | ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/pinned_drop/forget-pinned-drop-impl.stderr b/tests/ui/pinned_drop/forget-pinned-drop-impl.stderr index 9fd7cdb..d218545 100644 --- a/tests/ui/pinned_drop/forget-pinned-drop-impl.stderr +++ b/tests/ui/pinned_drop/forget-pinned-drop-impl.stderr @@ -1,7 +1,11 @@ error[E0277]: the trait bound `Struct: PinnedDrop` is not satisfied - --> $DIR/forget-pinned-drop-impl.rs:3:15 - | -3 | #[pin_project(PinnedDrop)] //~ ERROR E0277 - | ^^^^^^^^^^ the trait `PinnedDrop` is not implemented for `Struct` - | - = note: required by `pin_project::__private::PinnedDrop::drop` + --> $DIR/forget-pinned-drop-impl.rs:3:15 + | +3 | #[pin_project(PinnedDrop)] //~ ERROR E0277 + | ^^^^^^^^^^ the trait `PinnedDrop` is not implemented for `Struct` + | +note: required by `pin_project::__private::PinnedDrop::drop` + --> $DIR/lib.rs:186:9 + | +186 | unsafe fn drop(self: Pin<&mut Self>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/pinned_drop/self.stderr b/tests/ui/pinned_drop/self.stderr index 4ccbc41..7de286f 100644 --- a/tests/ui/pinned_drop/self.stderr +++ b/tests/ui/pinned_drop/self.stderr @@ -8,7 +8,7 @@ error: `self` parameter is only allowed in associated functions | ----- in this macro invocation | = note: associated functions are those in `impl` or `trait` definitions - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0434]: can't capture dynamic environment in a fn item --> $DIR/self.rs:16:29 @@ -20,7 +20,7 @@ error[E0434]: can't capture dynamic environment in a fn item | ----- in this macro invocation | = help: use the `|| { ... }` closure form instead - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0423]: expected value, found struct `S` --> $DIR/self.rs:40:27 diff --git a/tests/ui/unstable-features/marker_trait_attr-feature-gate.stderr b/tests/ui/unstable-features/marker_trait_attr-feature-gate.stderr index 44322ec..01e5080 100644 --- a/tests/ui/unstable-features/marker_trait_attr-feature-gate.stderr +++ b/tests/ui/unstable-features/marker_trait_attr-feature-gate.stderr @@ -7,4 +7,4 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 14 | impl<T> Unpin for Struct<T> {} | --------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/marker_trait_attr.stderr b/tests/ui/unstable-features/marker_trait_attr.stderr index 8893fb2..fbc2d9d 100644 --- a/tests/ui/unstable-features/marker_trait_attr.stderr +++ b/tests/ui/unstable-features/marker_trait_attr.stderr @@ -7,4 +7,4 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 20 | impl<T> Unpin for Struct<T> {} | --------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.stderr b/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.stderr index 64a0596..5eba425 100644 --- a/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.stderr +++ b/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.stderr @@ -7,4 +7,4 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 14 | impl<T> Unpin for Struct<T> {} | --------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/overlapping_marker_traits.stderr b/tests/ui/unstable-features/overlapping_marker_traits.stderr index ffa50c7..706d6c9 100644 --- a/tests/ui/unstable-features/overlapping_marker_traits.stderr +++ b/tests/ui/unstable-features/overlapping_marker_traits.stderr @@ -15,4 +15,4 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 24 | impl<T> Unpin for Struct<T> {} | --------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr b/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr index fa81083..cf3b075 100644 --- a/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr +++ b/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr @@ -23,7 +23,11 @@ error[E0277]: `PhantomPinned` cannot be unpinned | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Unpin` is not implemented for `PhantomPinned` | = note: consider using `Box::pin` - = note: required because of the requirements on the impl of `Unpin` for `phantom_pinned::Wrapper<PhantomPinned>` +note: required because of the requirements on the impl of `Unpin` for `phantom_pinned::Wrapper<PhantomPinned>` + --> $DIR/trivial_bounds-feature-gate.rs:12:13 + | +12 | impl<T> Unpin for Wrapper<T> where T: Unpin {} + | ^^^^^ ^^^^^^^^^^ = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable @@ -54,6 +58,10 @@ note: required because it appears within the type `Inner` | 30 | struct Inner(PhantomPinned); | ^^^^^ - = note: required because of the requirements on the impl of `Unpin` for `inner::Wrapper<Inner>` +note: required because of the requirements on the impl of `Unpin` for `inner::Wrapper<Inner>` + --> $DIR/trivial_bounds-feature-gate.rs:38:13 + | +38 | impl<T> Unpin for Wrapper<T> where T: Unpin {} + | ^^^^^ ^^^^^^^^^^ = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable |