diff options
Diffstat (limited to 'tests/ui/pin_project/project_replace_unsized.stderr')
-rw-r--r-- | tests/ui/pin_project/project_replace_unsized.stderr | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/tests/ui/pin_project/project_replace_unsized.stderr b/tests/ui/pin_project/project_replace_unsized.stderr index c3a3be7..0395c4e 100644 --- a/tests/ui/pin_project/project_replace_unsized.stderr +++ b/tests/ui/pin_project/project_replace_unsized.stderr @@ -6,11 +6,12 @@ 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 `std::marker::Sized` | - = help: within `Struct<T>`, the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = note: required because it appears within the type `Struct<T>` - = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature +help: function arguments must have a statically known size, borrowed types always have a known size + | +3 | #[pin_project(&project_replace)] //~ ERROR E0277 + | ^ error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized.rs:5:5 @@ -19,9 +20,6 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim | - this type parameter needs to be `std::marker::Sized` 5 | x: T, | ^ doesn't have a size known at compile-time - | - = help: the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized.rs:3:1 @@ -31,8 +29,6 @@ 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 `std::marker::Sized` | - = help: within `__StructProjectionOwned<T>`, the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = note: required because it appears within the type `__StructProjectionOwned<T>` = note: structs must have a statically known size to be initialized = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -45,11 +41,12 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim 9 | struct TupleStruct<T: ?Sized>(T); | - this type parameter needs to be `std::marker::Sized` | - = help: within `TupleStruct<T>`, the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = note: required because it appears within the type `TupleStruct<T>` - = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature +help: function arguments must have a statically known size, borrowed types always have a known size + | +8 | #[pin_project(&project_replace)] //~ ERROR E0277 + | ^ error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized.rs:8:1 @@ -59,8 +56,6 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim 9 | struct TupleStruct<T: ?Sized>(T); | - this type parameter needs to be `std::marker::Sized` | - = help: the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = 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 @@ -71,7 +66,5 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim | | | doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = note: all function arguments must have a statically known size = help: unsized locals are gated as an unstable feature |