diff options
Diffstat (limited to 'tests/ui/pin_project/project_replace_unsized_fn_params.stderr')
-rw-r--r-- | tests/ui/pin_project/project_replace_unsized_fn_params.stderr | 67 |
1 files changed, 50 insertions, 17 deletions
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 8ac4ad7..e398ca4 100644 --- a/tests/ui/pin_project/project_replace_unsized_fn_params.stderr +++ b/tests/ui/pin_project/project_replace_unsized_fn_params.stderr @@ -1,5 +1,5 @@ error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized_fn_params.rs:6:8 + --> tests/ui/pin_project/project_replace_unsized_fn_params.rs:6:8 | 6 | struct Struct<T: ?Sized> { | ^^^^^^^-^^^^^^^^^ @@ -8,14 +8,19 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim | doesn't have a size known at compile-time | note: required because it appears within the type `__StructProjectionOwned<T>` - --> $DIR/project_replace_unsized_fn_params.rs:6:8 + --> tests/ui/pin_project/project_replace_unsized_fn_params.rs:6:8 | 6 | struct Struct<T: ?Sized> { | ^^^^^^ = note: the return type of a function must have a statically known size +help: consider removing the `?Sized` bound to make the type parameter `Sized` + | +6 - struct Struct<T: ?Sized> { +6 + struct Struct<T> { + | error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized_fn_params.rs:5:1 + --> tests/ui/pin_project/project_replace_unsized_fn_params.rs:5:1 | 5 | #[pin_project(project_replace)] //~ ERROR E0277 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -23,27 +28,45 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim | - 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 + --> tests/ui/pin_project/project_replace_unsized_fn_params.rs:6:8 | 6 | struct Struct<T: ?Sized> { | ^^^^^^ -note: required by `UnsafeOverwriteGuard` - --> $DIR/lib.rs:269:5 +note: required by a bound in `UnsafeOverwriteGuard::<T>::new` + --> src/lib.rs | -269 | pub struct UnsafeOverwriteGuard<T> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | impl<T> UnsafeOverwriteGuard<T> { + | ^ required by this bound in `UnsafeOverwriteGuard::<T>::new` = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider removing the `?Sized` bound to make the type parameter `Sized` + | +6 - struct Struct<T: ?Sized> { +6 + struct Struct<T> { + | error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized_fn_params.rs:7:5 + --> tests/ui/pin_project/project_replace_unsized_fn_params.rs:7:5 | +5 | #[pin_project(project_replace)] //~ ERROR E0277 + | ------------------------------- required by a bound introduced by this call 6 | struct Struct<T: ?Sized> { | - this type parameter needs to be `std::marker::Sized` 7 | f: T, | ^ doesn't have a size known at compile-time + | +note: required by a bound in `std::ptr::read` + --> $RUST/core/src/ptr/mod.rs + | + | pub const unsafe fn read<T>(src: *const T) -> T { + | ^ required by this bound in `std::ptr::read` +help: consider removing the `?Sized` bound to make the type parameter `Sized` + | +6 - struct Struct<T: ?Sized> { +6 + struct Struct<T> { + | error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized_fn_params.rs:11:8 + --> tests/ui/pin_project/project_replace_unsized_fn_params.rs:11:8 | 11 | struct TupleStruct<T: ?Sized>(T); | ^^^^^^^^^^^^-^^^^^^^^^ @@ -52,14 +75,19 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim | doesn't have a size known at compile-time | note: required because it appears within the type `__TupleStructProjectionOwned<T>` - --> $DIR/project_replace_unsized_fn_params.rs:11:8 + --> tests/ui/pin_project/project_replace_unsized_fn_params.rs:11:8 | 11 | struct TupleStruct<T: ?Sized>(T); | ^^^^^^^^^^^ = note: the return type of a function must have a statically known size +help: consider removing the `?Sized` bound to make the type parameter `Sized` + | +11 - struct TupleStruct<T: ?Sized>(T); +11 + struct TupleStruct<T>(T); + | error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized_fn_params.rs:10:1 + --> tests/ui/pin_project/project_replace_unsized_fn_params.rs:10:1 | 10 | #[pin_project(project_replace)] //~ ERROR E0277 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -67,13 +95,18 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim | - 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 + --> tests/ui/pin_project/project_replace_unsized_fn_params.rs:11:8 | 11 | struct TupleStruct<T: ?Sized>(T); | ^^^^^^^^^^^ -note: required by `UnsafeOverwriteGuard` - --> $DIR/lib.rs:269:5 +note: required by a bound in `UnsafeOverwriteGuard::<T>::new` + --> src/lib.rs | -269 | pub struct UnsafeOverwriteGuard<T> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | impl<T> UnsafeOverwriteGuard<T> { + | ^ required by this bound in `UnsafeOverwriteGuard::<T>::new` = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider removing the `?Sized` bound to make the type parameter `Sized` + | +11 - struct TupleStruct<T: ?Sized>(T); +11 + struct TupleStruct<T>(T); + | |