fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.0 KiB56 linesraw
1error[E0277]: the trait bound `[u8; 1]: Read` is not satisfied
2  --> $DIR/issue-90528-unsizing-suggestion-1.rs:13:16
3   |
4LL |     wants_read([0u8]);
5   |     ---------- ^^^^^ the trait `Read` is not implemented for `[u8; 1]`
6   |     |
7   |     required by a bound introduced by this call
8   |
9   = help: the trait `Read` is implemented for `&[u8]`
10note: required by a bound in `wants_read`
11  --> $DIR/issue-90528-unsizing-suggestion-1.rs:10:23
12   |
13LL | fn wants_read(_: impl Read) {}
14   |                       ^^^^ required by this bound in `wants_read`
15help: convert the array to a `&[u8]` slice instead
16   |
17LL |     wants_read(&[0u8][..]);
18   |                +     ++++
19
20error[E0277]: the trait bound `&[u8; 1]: Read` is not satisfied
21  --> $DIR/issue-90528-unsizing-suggestion-1.rs:15:16
22   |
23LL |     wants_read(&[0u8]);
24   |     ---------- ^^^^^^ the trait `Read` is not implemented for `&[u8; 1]`
25   |     |
26   |     required by a bound introduced by this call
27   |
28   = help: the trait `Read` is implemented for `&[u8]`
29note: required by a bound in `wants_read`
30  --> $DIR/issue-90528-unsizing-suggestion-1.rs:10:23
31   |
32LL | fn wants_read(_: impl Read) {}
33   |                       ^^^^ required by this bound in `wants_read`
34help: convert the array to a `&[u8]` slice instead
35   |
36LL |     wants_read(&[0u8][..]);
37   |                      ++++
38
39error[E0277]: the trait bound `&mut [u8; 1]: Read` is not satisfied
40  --> $DIR/issue-90528-unsizing-suggestion-1.rs:18:16
41   |
42LL |     wants_read(&mut [0u8]);
43   |     ---------- ^^^^^^^^^^ the trait `Read` is not implemented for `&mut [u8; 1]`
44   |     |
45   |     required by a bound introduced by this call
46   |
47   = help: the trait `Read` is implemented for `&[u8]`
48note: required by a bound in `wants_read`
49  --> $DIR/issue-90528-unsizing-suggestion-1.rs:10:23
50   |
51LL | fn wants_read(_: impl Read) {}
52   |                       ^^^^ required by this bound in `wants_read`
53
54error: aborting due to 3 previous errors
55
56For more information about this error, try `rustc --explain E0277`.