fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: generic parameters may not be used in const operations 2 --> $DIR/const-argument-if-length.rs:17:24 3 | 4LL | pad: [u8; is_zst::<T>()], 5 | ^ cannot perform const operation using `T` 6 | 7 = note: type parameters may not be used in const expressions 8 = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions 9 10error[E0277]: the size for values of type `T` cannot be known at compilation time 11 --> $DIR/const-argument-if-length.rs:15:12 12 | 13LL | pub struct AtLeastByte<T: ?Sized> { 14 | - this type parameter needs to be `Sized` 15LL | value: T, 16 | ^ doesn't have a size known at compile-time 17 | 18 = note: only the last field of a struct may have a dynamically sized type 19 = help: change the field's type to have a statically known size 20help: consider removing the `?Sized` bound to make the type parameter `Sized` 21 | 22LL - pub struct AtLeastByte<T: ?Sized> { 23LL + pub struct AtLeastByte<T> { 24 | 25help: borrowed types always have a statically known size 26 | 27LL | value: &T, 28 | + 29help: the `Box` type always has a statically known size and allocates its contents in the heap 30 | 31LL | value: Box<T>, 32 | ++++ + 33 34error: aborting due to 2 previous errors 35 36For more information about this error, try `rustc --explain E0277`.