@@ -26,6 +26,10 @@ LL | assert_sized::<Foo>();
2626 = help: within `Foo`, the trait `std::marker::Sized` is not implemented for `A`
2727 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
2828 = note: required because it appears within the type `Foo`
29+ help: consider relaxing the implicit `Sized` restriction
30+ |
31+ LL | fn assert_sized<T: ?Sized>() { }
32+ | ^^^^^^^^
2933
3034error[E0277]: the size for values of type `A` cannot be known at compilation time
3135 --> $DIR/extern-types-unsized.rs:28:5
@@ -39,6 +43,10 @@ LL | assert_sized::<Bar<A>>();
3943 = help: within `Bar<A>`, the trait `std::marker::Sized` is not implemented for `A`
4044 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
4145 = note: required because it appears within the type `Bar<A>`
46+ help: consider relaxing the implicit `Sized` restriction
47+ |
48+ LL | fn assert_sized<T: ?Sized>() { }
49+ | ^^^^^^^^
4250
4351error[E0277]: the size for values of type `A` cannot be known at compilation time
4452 --> $DIR/extern-types-unsized.rs:31:5
@@ -53,6 +61,10 @@ LL | assert_sized::<Bar<Bar<A>>>();
5361 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
5462 = note: required because it appears within the type `Bar<A>`
5563 = note: required because it appears within the type `Bar<Bar<A>>`
64+ help: consider relaxing the implicit `Sized` restriction
65+ |
66+ LL | fn assert_sized<T: ?Sized>() { }
67+ | ^^^^^^^^
5668
5769error: aborting due to 4 previous errors
5870
0 commit comments