]> git.lizzy.rs Git - rust.git/blob - src/test/ui/dst/dst-bad-coerce1.stderr
Remove E0308 note when primary label has all info
[rust.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    = note: expected reference `&Fat<[usize]>`
8               found reference `&Fat<[isize; 3]>`
9
10 error[E0277]: the trait bound `Foo: Bar` is not satisfied
11   --> $DIR/dst-bad-coerce1.rs:22:29
12    |
13 LL |     let f3: &Fat<dyn Bar> = f2;
14    |                             ^^ the trait `Bar` is not implemented for `Foo`
15    |
16    = note: required for the cast to the object type `dyn Bar`
17
18 error[E0308]: mismatched types
19   --> $DIR/dst-bad-coerce1.rs:28:27
20    |
21 LL |     let f3: &([usize],) = f2;
22    |                           ^^ expected slice `[usize]`, found array `[isize; 3]`
23    |
24    = note: expected reference `&([usize],)`
25               found reference `&([isize; 3],)`
26
27 error[E0277]: the trait bound `Foo: Bar` is not satisfied
28   --> $DIR/dst-bad-coerce1.rs:34:27
29    |
30 LL |     let f3: &(dyn Bar,) = f2;
31    |                           ^^ the trait `Bar` is not implemented for `Foo`
32    |
33    = note: required for the cast to the object type `dyn Bar`
34
35 error: aborting due to 4 previous errors
36
37 Some errors have detailed explanations: E0277, E0308.
38 For more information about an error, try `rustc --explain E0277`.