diff options
Diffstat (limited to 'tests/ui')
-rw-r--r-- | tests/ui/cfg/packed_sneaky-span-issue-1.rs | 4 | ||||
-rw-r--r-- | tests/ui/cfg/packed_sneaky-span-issue-1.stderr | 10 | ||||
-rw-r--r-- | tests/ui/cfg/packed_sneaky-span-issue-2.rs | 4 | ||||
-rw-r--r-- | tests/ui/cfg/packed_sneaky-span-issue-2.stderr | 10 | ||||
-rw-r--r-- | tests/ui/cfg/unsupported.rs | 4 | ||||
-rw-r--r-- | tests/ui/cfg/unsupported.stderr | 9 | ||||
-rw-r--r-- | tests/ui/pin_project/project_replace_unsized.stderr | 38 | ||||
-rw-r--r-- | tests/ui/pin_project/project_replace_unsized_fn_params.stderr | 38 | ||||
-rw-r--r-- | tests/ui/unstable-features/marker_trait_attr-feature-gate.rs | 2 | ||||
-rw-r--r-- | tests/ui/unstable-features/marker_trait_attr.rs | 2 | ||||
-rw-r--r-- | tests/ui/unstable-features/overlapping_marker_traits-feature-gate.rs | 2 | ||||
-rw-r--r-- | tests/ui/unstable-features/overlapping_marker_traits.rs | 2 | ||||
-rw-r--r-- | tests/ui/unstable-features/trivial_bounds-bug.rs | 2 | ||||
-rw-r--r-- | tests/ui/unstable-features/trivial_bounds-feature-gate.rs | 2 | ||||
-rw-r--r-- | tests/ui/unstable-features/trivial_bounds.rs | 2 |
15 files changed, 79 insertions, 52 deletions
diff --git a/tests/ui/cfg/packed_sneaky-span-issue-1.rs b/tests/ui/cfg/packed_sneaky-span-issue-1.rs index 8455d07..42f57b5 100644 --- a/tests/ui/cfg/packed_sneaky-span-issue-1.rs +++ b/tests/ui/cfg/packed_sneaky-span-issue-1.rs @@ -1,12 +1,10 @@ use auxiliary_macro::hidden_repr; use pin_project::pin_project; -//~ ERROR may not be used on #[repr(packed)] types -// span is lost. -// Refs: https://github.com/rust-lang/rust/issues/43081 #[pin_project] #[hidden_repr(packed)] struct S { + //~^ ERROR may not be used on #[repr(packed)] types #[cfg(not(any()))] #[pin] f: u32, diff --git a/tests/ui/cfg/packed_sneaky-span-issue-1.stderr b/tests/ui/cfg/packed_sneaky-span-issue-1.stderr index f4d7dee..abe3ecd 100644 --- a/tests/ui/cfg/packed_sneaky-span-issue-1.stderr +++ b/tests/ui/cfg/packed_sneaky-span-issue-1.stderr @@ -1 +1,11 @@ error: #[pin_project] attribute may not be used on #[repr(packed)] types + --> $DIR/packed_sneaky-span-issue-1.rs:6:1 + | +6 | / struct S { +7 | | //~^ ERROR may not be used on #[repr(packed)] types +8 | | #[cfg(not(any()))] +9 | | #[pin] +... | +13 | | f: u8, +14 | | } + | |_^ diff --git a/tests/ui/cfg/packed_sneaky-span-issue-2.rs b/tests/ui/cfg/packed_sneaky-span-issue-2.rs index 01706ee..948d72c 100644 --- a/tests/ui/cfg/packed_sneaky-span-issue-2.rs +++ b/tests/ui/cfg/packed_sneaky-span-issue-2.rs @@ -1,12 +1,10 @@ use auxiliary_macro::hidden_repr; use pin_project::pin_project; -//~ ERROR may not be used on #[repr(packed)] types -// span is lost. -// Refs: https://github.com/rust-lang/rust/issues/43081 #[pin_project] #[hidden_repr(packed)] struct S { + //~^ ERROR may not be used on #[repr(packed)] types #[cfg(any())] #[pin] f: u32, diff --git a/tests/ui/cfg/packed_sneaky-span-issue-2.stderr b/tests/ui/cfg/packed_sneaky-span-issue-2.stderr index f4d7dee..a957ceb 100644 --- a/tests/ui/cfg/packed_sneaky-span-issue-2.stderr +++ b/tests/ui/cfg/packed_sneaky-span-issue-2.stderr @@ -1 +1,11 @@ error: #[pin_project] attribute may not be used on #[repr(packed)] types + --> $DIR/packed_sneaky-span-issue-2.rs:6:1 + | +6 | / struct S { +7 | | //~^ ERROR may not be used on #[repr(packed)] types +8 | | #[cfg(any())] +9 | | #[pin] +... | +13 | | f: u8, +14 | | } + | |_^ diff --git a/tests/ui/cfg/unsupported.rs b/tests/ui/cfg/unsupported.rs index c450f6f..b950d4b 100644 --- a/tests/ui/cfg/unsupported.rs +++ b/tests/ui/cfg/unsupported.rs @@ -1,10 +1,8 @@ use pin_project::pin_project; -//~ ERROR may not be used on structs with zero fields -// span is lost. -// Refs: https://github.com/rust-lang/rust/issues/43081 #[pin_project] struct S { + //~^ ERROR may not be used on structs with zero fields #[cfg(any())] #[pin] f: u8, diff --git a/tests/ui/cfg/unsupported.stderr b/tests/ui/cfg/unsupported.stderr index 0ee8676..b3bd1ae 100644 --- a/tests/ui/cfg/unsupported.stderr +++ b/tests/ui/cfg/unsupported.stderr @@ -1 +1,10 @@ error: #[pin_project] attribute may not be used on structs with zero fields + --> $DIR/unsupported.rs:4:1 + | +4 | / struct S { +5 | | //~^ ERROR may not be used on structs with zero fields +6 | | #[cfg(any())] +7 | | #[pin] +8 | | f: u8, +9 | | } + | |_^ diff --git a/tests/ui/pin_project/project_replace_unsized.stderr b/tests/ui/pin_project/project_replace_unsized.stderr index e40db5f..26e416a 100644 --- a/tests/ui/pin_project/project_replace_unsized.stderr +++ b/tests/ui/pin_project/project_replace_unsized.stderr @@ -14,14 +14,6 @@ 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:5:5 - | -4 | struct Struct<T: ?Sized> { - | - this type parameter needs to be `Sized` -5 | f: T, - | ^ doesn't have a size known at compile-time - -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 @@ -29,11 +21,19 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim 4 | struct Struct<T: ?Sized> { | - this type parameter needs to be `Sized` | - = note: required because it appears within the type `__StructProjectionOwned<T>` - = note: structs must have a statically known size to be initialized + = note: required because it appears within the type `Struct<T>` + = note: required by `UnsafeOverwriteGuard` = note: this error originates in a derive macro (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 + | +4 | struct Struct<T: ?Sized> { + | - this type parameter needs to be `Sized` +5 | f: T, + | ^ doesn't have a size known at compile-time + +error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized.rs:8:15 | 8 | #[pin_project(project_replace)] //~ ERROR E0277 @@ -49,14 +49,16 @@ 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 `Sized` - | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + --> $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 `Sized` + | + = note: required because it appears within the type `TupleStruct<T>` + = note: required by `UnsafeOverwriteGuard` + = note: this error originates in a derive macro (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 622d12f..f0f9573 100644 --- a/tests/ui/pin_project/project_replace_unsized_fn_params.stderr +++ b/tests/ui/pin_project/project_replace_unsized_fn_params.stderr @@ -11,14 +11,6 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim = 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:7:5 - | -6 | struct Struct<T: ?Sized> { - | - this type parameter needs to be `Sized` -7 | f: T, - | ^ doesn't have a size known at compile-time - -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 @@ -26,11 +18,19 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim 6 | struct Struct<T: ?Sized> { | - this type parameter needs to be `Sized` | - = note: required because it appears within the type `__StructProjectionOwned<T>` - = note: structs must have a statically known size to be initialized + = note: required because it appears within the type `Struct<T>` + = note: required by `UnsafeOverwriteGuard` = note: this error originates in a derive macro (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 + | +6 | struct Struct<T: ?Sized> { + | - this type parameter needs to be `Sized` +7 | f: T, + | ^ doesn't have a size known at compile-time + +error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized_fn_params.rs:11:8 | 11 | struct TupleStruct<T: ?Sized>(T); @@ -43,11 +43,13 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim = 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 `Sized` - | - = 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: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 `Sized` + | + = note: required because it appears within the type `TupleStruct<T>` + = note: required by `UnsafeOverwriteGuard` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/marker_trait_attr-feature-gate.rs b/tests/ui/unstable-features/marker_trait_attr-feature-gate.rs index 8860f4f..127cd1a 100644 --- a/tests/ui/unstable-features/marker_trait_attr-feature-gate.rs +++ b/tests/ui/unstable-features/marker_trait_attr-feature-gate.rs @@ -1,4 +1,4 @@ -// NB: If you change this test, change 'marker_trait_attr.rs' at the same time. +// Note: If you change this test, change 'marker_trait_attr.rs' at the same time. use pin_project::pin_project; use std::marker::PhantomPinned; diff --git a/tests/ui/unstable-features/marker_trait_attr.rs b/tests/ui/unstable-features/marker_trait_attr.rs index a6ca357..d6eab21 100644 --- a/tests/ui/unstable-features/marker_trait_attr.rs +++ b/tests/ui/unstable-features/marker_trait_attr.rs @@ -1,4 +1,4 @@ -// NB: If you change this test, change 'marker_trait_attr-feature-gate.rs' at the same time. +// Note: If you change this test, change 'marker_trait_attr-feature-gate.rs' at the same time. // marker_trait_attr // Tracking issue: https://github.com/rust-lang/rust/issues/29864 diff --git a/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.rs b/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.rs index 3af3cf0..9d1b8b8 100644 --- a/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.rs +++ b/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.rs @@ -1,4 +1,4 @@ -// NB: If you change this test, change 'overlapping_marker_traits.rs' at the same time. +// Note: If you change this test, change 'overlapping_marker_traits.rs' at the same time. use pin_project::pin_project; use std::marker::PhantomPinned; diff --git a/tests/ui/unstable-features/overlapping_marker_traits.rs b/tests/ui/unstable-features/overlapping_marker_traits.rs index c897d1c..0e0cddd 100644 --- a/tests/ui/unstable-features/overlapping_marker_traits.rs +++ b/tests/ui/unstable-features/overlapping_marker_traits.rs @@ -1,4 +1,4 @@ -// NB: If you change this test, change 'overlapping_marker_traits-feature-gate.rs' at the same time. +// Note: If you change this test, change 'overlapping_marker_traits-feature-gate.rs' at the same time. // This feature could break the guarantee for Unpin provided by pin-project, // but was removed in https://github.com/rust-lang/rust/pull/68544 (nightly-2020-02-06). diff --git a/tests/ui/unstable-features/trivial_bounds-bug.rs b/tests/ui/unstable-features/trivial_bounds-bug.rs index 2ec4960..5e821c4 100644 --- a/tests/ui/unstable-features/trivial_bounds-bug.rs +++ b/tests/ui/unstable-features/trivial_bounds-bug.rs @@ -1,4 +1,4 @@ -// NB: If you change this test, change 'trivial_bounds-feature-gate.rs' at the same time. +// Note: If you change this test, change 'trivial_bounds-feature-gate.rs' at the same time. // trivial_bounds // Tracking issue: https://github.com/rust-lang/rust/issues/48214 diff --git a/tests/ui/unstable-features/trivial_bounds-feature-gate.rs b/tests/ui/unstable-features/trivial_bounds-feature-gate.rs index ccdb182..f8467b0 100644 --- a/tests/ui/unstable-features/trivial_bounds-feature-gate.rs +++ b/tests/ui/unstable-features/trivial_bounds-feature-gate.rs @@ -1,4 +1,4 @@ -// NB: If you change this test, change 'trivial_bounds.rs' at the same time. +// Note: If you change this test, change 'trivial_bounds.rs' at the same time. mod phantom_pinned { use std::marker::{PhantomData, PhantomPinned}; diff --git a/tests/ui/unstable-features/trivial_bounds.rs b/tests/ui/unstable-features/trivial_bounds.rs index 680effe..2323bab 100644 --- a/tests/ui/unstable-features/trivial_bounds.rs +++ b/tests/ui/unstable-features/trivial_bounds.rs @@ -1,4 +1,4 @@ -// NB: If you change this test, change 'trivial_bounds-feature-gate.rs' at the same time. +// Note: If you change this test, change 'trivial_bounds-feature-gate.rs' at the same time. // trivial_bounds // Tracking issue: https://github.com/rust-lang/rust/issues/48214 |