11error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
2- --> $DIR/wf-bounds.rs:13 :22
2+ --> $DIR/wf-bounds.rs:17 :22
33 |
44LL | fn nya() -> impl Wf<Vec<[u8]>>;
55 | ^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -9,14 +9,14 @@ note: required by a bound in `Vec`
99 --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
1010
1111error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
12- --> $DIR/wf-bounds.rs:16 :23
12+ --> $DIR/wf-bounds.rs:20 :23
1313 |
1414LL | fn nya2() -> impl Wf<[u8]>;
1515 | ^^^^^^^^ doesn't have a size known at compile-time
1616 |
1717 = help: the trait `Sized` is not implemented for `[u8]`
1818note: required by a bound in `Wf`
19- --> $DIR/wf-bounds.rs:8 :10
19+ --> $DIR/wf-bounds.rs:10 :10
2020 |
2121LL | trait Wf<T> {
2222 | ^ required by this bound in `Wf`
@@ -26,7 +26,7 @@ LL | trait Wf<T: ?Sized> {
2626 | ++++++++
2727
2828error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
29- --> $DIR/wf-bounds.rs:19 :44
29+ --> $DIR/wf-bounds.rs:23 :44
3030 |
3131LL | fn nya3() -> impl Wf<(), Output = impl Wf<Vec<[u8]>>>;
3232 | ^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -35,6 +35,23 @@ LL | fn nya3() -> impl Wf<(), Output = impl Wf<Vec<[u8]>>>;
3535note: required by a bound in `Vec`
3636 --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
3737
38- error: aborting due to 3 previous errors
38+ error[E0277]: `T` doesn't implement `std::fmt::Display`
39+ --> $DIR/wf-bounds.rs:26:26
40+ |
41+ LL | fn nya4<T>() -> impl Wf<NeedsDisplay<T>>;
42+ | ^^^^^^^^^^^^^^^^^^^ `T` cannot be formatted with the default formatter
43+ |
44+ = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
45+ note: required by a bound in `NeedsDisplay`
46+ --> $DIR/wf-bounds.rs:14:24
47+ |
48+ LL | struct NeedsDisplay<T: Display>(T);
49+ | ^^^^^^^ required by this bound in `NeedsDisplay`
50+ help: consider restricting type parameter `T`
51+ |
52+ LL | fn nya4<T: std::fmt::Display>() -> impl Wf<NeedsDisplay<T>>;
53+ | +++++++++++++++++++
54+
55+ error: aborting due to 4 previous errors
3956
4057For more information about this error, try `rustc --explain E0277`.
0 commit comments