fix error for unsized packed struct field
This commit is contained in:
parent
afd0a2f249
commit
2fd2f9cfaf
5 changed files with 32 additions and 17 deletions
|
|
@ -7,7 +7,7 @@ LL | data: T, //~ ERROR the size for values of type
|
|||
= help: the trait `std::marker::Sized` is not implemented for `T`
|
||||
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
|
||||
= help: consider adding a `where T: std::marker::Sized` bound
|
||||
= note: only the last field of a struct may have a dynamically sized type
|
||||
= note: the last field of a packed struct may only have a dynamically sized type if it does not need drop to be run
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue