X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Funsized%2Funsized3.stderr;h=d64091b15eb1fc2c747980353ca77551e9d41dea;hb=d708bc45c4092432f87090c1624c25bf76f49d9e;hp=ae89f2f997728cc2de862b0cca3517d81bdedc03;hpb=7f605496e75141b473827f3b8d5cdeb17e9f3408;p=rust.git diff --git a/src/test/ui/unsized/unsized3.stderr b/src/test/ui/unsized/unsized3.stderr index ae89f2f9977..d64091b15eb 100644 --- a/src/test/ui/unsized/unsized3.stderr +++ b/src/test/ui/unsized/unsized3.stderr @@ -17,7 +17,7 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized` | LL - fn f1(x: &X) { LL + fn f1(x: &X) { - | + | help: consider relaxing the implicit `Sized` restriction | LL | fn f2(x: &X) { @@ -42,7 +42,7 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized` | LL - fn f3(x: &X) { LL + fn f3(x: &X) { - | + | help: consider relaxing the implicit `Sized` restriction | LL | fn f4(x: &X) { @@ -72,7 +72,7 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized` | LL - fn f8(x1: &S, x2: &S) { LL + fn f8(x1: &S, x2: &S) { - | + | help: consider relaxing the implicit `Sized` restriction | LL | fn f5(x: &Y) {} @@ -98,7 +98,30 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized` | LL - fn f9(x1: Box>) { LL + fn f9(x1: Box>) { - | + | + +error[E0277]: the size for values of type `X` cannot be known at compilation time + --> $DIR/unsized3.rs:45:9 + | +LL | fn f10(x1: Box>) { + | - this type parameter needs to be `std::marker::Sized` +LL | f5(&(32, *x1)); + | -- ^^^^^^^^^ doesn't have a size known at compile-time + | | + | required by a bound introduced by this call + | +note: required because it appears within the type `S` + --> $DIR/unsized3.rs:28:8 + | +LL | struct S { + | ^ + = note: required because it appears within the type `({integer}, S)` + = note: tuples must have a statically known size to be initialized +help: consider removing the `?Sized` bound to make the type parameter `Sized` + | +LL - fn f10(x1: Box>) { +LL + fn f10(x1: Box>) { + | error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized3.rs:45:8 @@ -116,13 +139,21 @@ note: required because it appears within the type `S` LL | struct S { | ^ = note: required because it appears within the type `({integer}, S)` - = note: tuples must have a statically known size to be initialized +note: required by a bound in `f5` + --> $DIR/unsized3.rs:24:7 + | +LL | fn f5(x: &Y) {} + | ^ required by this bound in `f5` help: consider removing the `?Sized` bound to make the type parameter `Sized` | LL - fn f10(x1: Box>) { LL + fn f10(x1: Box>) { - | + | +help: consider relaxing the implicit `Sized` restriction + | +LL | fn f5(x: &Y) {} + | ++++++++ -error: aborting due to 5 previous errors +error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0277`.