]> git.proxmox.com Git - rustc.git/blob - tests/ui/dst/dst-bad-coerce1.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / 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 `&Fat<[usize]>`, found `&Fat<[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 help: this trait has no implementations, consider adding one
19 --> $DIR/dst-bad-coerce1.rs:10:1
20 |
21 LL | trait Bar { fn bar(&self) {} }
22 | ^^^^^^^^^
23 = note: required for the cast from `&Fat<Foo>` to `&Fat<dyn Bar>`
24
25 error[E0308]: mismatched types
26 --> $DIR/dst-bad-coerce1.rs:28:27
27 |
28 LL | let f3: &([usize],) = f2;
29 | ----------- ^^ expected `&([usize],)`, found `&([isize; 3],)`
30 | |
31 | expected due to this
32 |
33 = note: expected reference `&([usize],)`
34 found reference `&([isize; 3],)`
35
36 error[E0277]: the trait bound `Foo: Bar` is not satisfied
37 --> $DIR/dst-bad-coerce1.rs:34:27
38 |
39 LL | let f3: &(dyn Bar,) = f2;
40 | ^^ the trait `Bar` is not implemented for `Foo`
41 |
42 help: this trait has no implementations, consider adding one
43 --> $DIR/dst-bad-coerce1.rs:10:1
44 |
45 LL | trait Bar { fn bar(&self) {} }
46 | ^^^^^^^^^
47 = note: required for the cast from `&(Foo,)` to `&(dyn Bar,)`
48
49 error: aborting due to 4 previous errors
50
51 Some errors have detailed explanations: E0277, E0308.
52 For more information about an error, try `rustc --explain E0277`.