@@ -92,27 +92,6 @@ LL - fn f9<X: ?Sized>(x1: Box<S<X>>) {
9292LL + fn f9<X>(x1: Box<S<X>>) {
9393 |
9494
95- error[E0277]: the size for values of type `X` cannot be known at compilation time
96- --> $DIR/unsized3.rs:45:9
97- |
98- LL | fn f10<X: ?Sized>(x1: Box<S<X>>) {
99- | - this type parameter needs to be `std::marker::Sized`
100- LL | f5(&(32, *x1));
101- | ^^^^^^^^^ doesn't have a size known at compile-time
102- |
103- note: required because it appears within the type `S<X>`
104- --> $DIR/unsized3.rs:28:8
105- |
106- LL | struct S<X: ?Sized> {
107- | ^
108- = note: required because it appears within the type `({integer}, S<X>)`
109- = note: tuples must have a statically known size to be initialized
110- help: consider removing the `?Sized` bound to make the type parameter `Sized`
111- |
112- LL - fn f10<X: ?Sized>(x1: Box<S<X>>) {
113- LL + fn f10<X>(x1: Box<S<X>>) {
114- |
115-
11695error[E0277]: the size for values of type `X` cannot be known at compilation time
11796 --> $DIR/unsized3.rs:45:8
11897 |
@@ -127,21 +106,13 @@ note: required because it appears within the type `S<X>`
127106LL | struct S<X: ?Sized> {
128107 | ^
129108 = note: required because it appears within the type `({integer}, S<X>)`
130- note: required by a bound in `f5`
131- --> $DIR/unsized3.rs:24:7
132- |
133- LL | fn f5<Y>(x: &Y) {}
134- | ^ required by this bound in `f5`
109+ = note: tuples must have a statically known size to be initialized
135110help: consider removing the `?Sized` bound to make the type parameter `Sized`
136111 |
137112LL - fn f10<X: ?Sized>(x1: Box<S<X>>) {
138113LL + fn f10<X>(x1: Box<S<X>>) {
139114 |
140- help: consider relaxing the implicit `Sized` restriction
141- |
142- LL | fn f5<Y: ?Sized>(x: &Y) {}
143- | ++++++++
144115
145- error: aborting due to 6 previous errors
116+ error: aborting due to 5 previous errors
146117
147118For more information about this error, try `rustc --explain E0277`.
0 commit comments