mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
28 lines
1.3 KiB
Plaintext
28 lines
1.3 KiB
Plaintext
error[E0277]: the size for values of type `V` cannot be known at compilation time
|
|
--> $DIR/issue-unsized-tail-restatic-ice-122488.rs:5:61
|
|
|
|
|
LL | struct ArenaSet<U: Deref, V: ?Sized = <U as Deref>::Target>(V, U);
|
|
| -------------------------------- ^ doesn't have a size known at compile-time
|
|
| |
|
|
| this type parameter needs to be `Sized`
|
|
|
|
|
= note: only the last field of a struct may have a dynamically sized type
|
|
= help: change the field's type to have a statically known size
|
|
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
|
|
|
|
LL - struct ArenaSet<U: Deref, V: ?Sized = <U as Deref>::Target>(V, U);
|
|
LL + struct ArenaSet<U: Deref, V = <U as Deref>::Target>(V, U);
|
|
|
|
|
help: borrowed types always have a statically known size
|
|
|
|
|
LL | struct ArenaSet<U: Deref, V: ?Sized = <U as Deref>::Target>(&V, U);
|
|
| +
|
|
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
|
|
|
|
LL | struct ArenaSet<U: Deref, V: ?Sized = <U as Deref>::Target>(Box<V>, U);
|
|
| ++++ +
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|