diff options
Diffstat (limited to 'tests/ui/pin_project')
-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 |
2 files changed, 40 insertions, 36 deletions
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) |