| error[E0277]: the size for values of type `T` cannot be known at compilation time |
| --> $DIR/feature-gate-lazy_normalization_consts.rs:6:23 |
| | |
| LL | pub const fn sof<T>() -> usize { |
| | - required by this bound in `sof` |
| ... |
| LL | fn test<T>() { |
| | - this type parameter needs to be `std::marker::Sized` |
| LL | let _: [u8; sof::<T>()]; |
| | ^ doesn't have a size known at compile-time |
| | |
| = help: the trait `std::marker::Sized` is not implemented for `T` |
| = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> |
| help: consider relaxing the implicit `Sized` restriction |
| | |
| LL | pub const fn sof<T: ?Sized>() -> usize { |
| | ^^^^^^^^ |
| |
| error: aborting due to previous error |
| |
| For more information about this error, try `rustc --explain E0277`. |