]> git.proxmox.com Git - rustc.git/blob - src/test/ui/dst/dst-bad-coerce1.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / dst / dst-bad-coerce1.stderr
1 error[E0308]: mismatched types
2 --> $DIR/dst-bad-coerce1.rs:16:29
3 |
4 LL | let f3: &Fat<[usize]> = f2;
5 | ------------- ^^ expected slice `[usize]`, found array `[isize; 3]`
6 | |
7 | expected due to this
8 |
9 = note: expected reference `&Fat<[usize]>`
10 found reference `&Fat<[isize; 3]>`
11
12 error[E0277]: the trait bound `Foo: Bar` is not satisfied
13 --> $DIR/dst-bad-coerce1.rs:22:29
14 |
15 LL | let f3: &Fat<dyn Bar> = f2;
16 | ^^ the trait `Bar` is not implemented for `Foo`
17 |
18 = note: required for the cast to the object type `dyn Bar`
19
20 error[E0308]: mismatched types
21 --> $DIR/dst-bad-coerce1.rs:28:27
22 |
23 LL | let f3: &([usize],) = f2;
24 | ----------- ^^ expected slice `[usize]`, found array `[isize; 3]`
25 | |
26 | expected due to this
27 |
28 = note: expected reference `&([usize],)`
29 found reference `&([isize; 3],)`
30
31 error[E0277]: the trait bound `Foo: Bar` is not satisfied
32 --> $DIR/dst-bad-coerce1.rs:34:27
33 |
34 LL | let f3: &(dyn Bar,) = f2;
35 | ^^ the trait `Bar` is not implemented for `Foo`
36 |
37 = note: required for the cast to the object type `dyn Bar`
38
39 error: aborting due to 4 previous errors
40
41 Some errors have detailed explanations: E0277, E0308.
42 For more information about an error, try `rustc --explain E0277`.