error: only the last field of a DST struct may be unsized
--> tests/compilation/fail_StrNotLast.rs:7:10
|
7 | #[derive(DST)]
| ^^^
|
note: deriving DSTs with `str` as a tail is not supported
--> tests/compilation/fail_StrNotLast.rs:9:11
|
9 | name: str,
| ^^^
= note: this error originates in the derive macro `DST` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> tests/compilation/fail_StrNotLast.rs:9:11
|
9 | name: str,
| ^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`
= 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: borrowed types always have a statically known size
|
9 | name: &str,
| +
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
9 | name: Box<str>,
| ++++ +