fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.0
1error[E0277]: the size for values of type `T` cannot be known at compilation time 2 --> $DIR/unsized-struct.rs:6:36 3 | 4LL | struct Foo<T> { data: T } 5 | ------------- required by `Foo` 6LL | fn foo1<T>() { not_sized::<Foo<T>>() } // Hunky dory. 7LL | fn foo2<T: ?Sized>() { not_sized::<Foo<T>>() } 8 | ^^^^^^ doesn't have a size known at compile-time 9 | 10 = help: the trait `std::marker::Sized` is not implemented for `T` 11 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> 12 = help: consider adding a `where T: std::marker::Sized` bound 13 14error[E0277]: the size for values of type `T` cannot be known at compilation time 15 --> $DIR/unsized-struct.rs:13:24 16 | 17LL | fn is_sized<T:Sized>() { } 18 | -------- - required by this bound in `is_sized` 19... 20LL | fn bar2<T: ?Sized>() { is_sized::<Bar<T>>() } 21 | ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time 22 | 23 = help: within `Bar<T>`, the trait `std::marker::Sized` is not implemented for `T` 24 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> 25 = help: consider adding a `where T: std::marker::Sized` bound 26 = note: required because it appears within the type `Bar<T>` 27 28error: aborting due to 2 previous errors 29 30For more information about this error, try `rustc --explain E0277`.