diff options
Diffstat (limited to 'tests/ui/pin_project/project_replace_unsized_locals.stderr')
-rw-r--r-- | tests/ui/pin_project/project_replace_unsized_locals.stderr | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/ui/pin_project/project_replace_unsized_locals.stderr b/tests/ui/pin_project/project_replace_unsized_locals.stderr new file mode 100644 index 0000000..1616904 --- /dev/null +++ b/tests/ui/pin_project/project_replace_unsized_locals.stderr @@ -0,0 +1,64 @@ +error[E0277]: the size for values of type `T` cannot be known at compilation time + --> $DIR/project_replace_unsized_locals.rs:6:8 + | +6 | struct Struct<T: ?Sized> { + | ^^^^^^^-^^^^^^^^^ + | | | + | | this type parameter needs to be `std::marker::Sized` + | doesn't have a size known at compile-time + | + = 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: 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_locals.rs:7:5 + | +6 | struct Struct<T: ?Sized> { + | - this type parameter needs to be `std::marker::Sized` +7 | 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_locals.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` + | + = 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) + +error[E0277]: the size for values of type `T` cannot be known at compilation time + --> $DIR/project_replace_unsized_locals.rs:11:8 + | +11 | struct TupleStruct<T: ?Sized>(T); + | ^^^^^^^^^^^^-^^^^^^^^^ + | | | + | | this type parameter needs to be `std::marker::Sized` + | doesn't have a size known at compile-time + | + = help: within `__TupleStructProjectionOwned<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 `__TupleStructProjectionOwned<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_locals.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` + | + = 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) |