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