]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-35988.stderr
Suggest boxing or borrowing unsized fields
[rust.git] / src / test / ui / issues / issue-35988.stderr
1 error[E0277]: the size for values of type `[std::boxed::Box<E>]` cannot be known at compilation time
2   --> $DIR/issue-35988.rs:2:7
3    |
4 LL |     V([Box<E>]),
5    |       ^^^^^^^^ doesn't have a size known at compile-time
6    |
7    = help: the trait `std::marker::Sized` is not implemented for `[std::boxed::Box<E>]`
8    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
9    = note: no field of an enum variant may have a dynamically sized type
10    = help: change the field's type to have a statically known size
11 help: borrowed types always have a statically known size
12    |
13 LL |     V(&[Box<E>]),
14    |       ^
15 help: heap allocated types always have a statically known size
16    |
17 LL |     V(Box<[Box<E>]>),
18    |       ^^^^        ^
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0277`.