@@ -26,6 +26,10 @@ LL | assert_sized::<Foo>();
26
26
= help: within `Foo`, the trait `std::marker::Sized` is not implemented for `A`
27
27
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
28
28
= 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
+ | ^^^^^^^^
29
33
30
34
error[E0277]: the size for values of type `A` cannot be known at compilation time
31
35
--> $DIR/extern-types-unsized.rs:28:5
@@ -39,6 +43,10 @@ LL | assert_sized::<Bar<A>>();
39
43
= help: within `Bar<A>`, the trait `std::marker::Sized` is not implemented for `A`
40
44
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
41
45
= 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
+ | ^^^^^^^^
42
50
43
51
error[E0277]: the size for values of type `A` cannot be known at compilation time
44
52
--> $DIR/extern-types-unsized.rs:31:5
@@ -53,6 +61,10 @@ LL | assert_sized::<Bar<Bar<A>>>();
53
61
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
54
62
= note: required because it appears within the type `Bar<A>`
55
63
= 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
+ | ^^^^^^^^
56
68
57
69
error: aborting due to 4 previous errors
58
70
0 commit comments