1
1
error[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
3
3
|
4
4
LL | fn nya() -> impl Wf<Vec<[u8]>>;
5
5
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -9,14 +9,14 @@ note: required by a bound in `Vec`
9
9
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
10
10
11
11
error[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
13
13
|
14
14
LL | fn nya2() -> impl Wf<[u8]>;
15
15
| ^^^^^^^^ doesn't have a size known at compile-time
16
16
|
17
17
= help: the trait `Sized` is not implemented for `[u8]`
18
18
note: required by a bound in `Wf`
19
- --> $DIR/wf-bounds.rs:8 :10
19
+ --> $DIR/wf-bounds.rs:10 :10
20
20
|
21
21
LL | trait Wf<T> {
22
22
| ^ required by this bound in `Wf`
@@ -26,7 +26,7 @@ LL | trait Wf<T: ?Sized> {
26
26
| ++++++++
27
27
28
28
error[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
30
30
|
31
31
LL | fn nya3() -> impl Wf<(), Output = impl Wf<Vec<[u8]>>>;
32
32
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -35,6 +35,23 @@ LL | fn nya3() -> impl Wf<(), Output = impl Wf<Vec<[u8]>>>;
35
35
note: required by a bound in `Vec`
36
36
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
37
37
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
39
56
40
57
For more information about this error, try `rustc --explain E0277`.
0 commit comments