fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.4 KiB42 linesraw
1error[E0308]: mismatched types
2  --> $DIR/dst-bad-coerce1.rs:16:29
3   |
4LL |     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
12error[E0277]: the trait bound `Foo: Bar` is not satisfied
13  --> $DIR/dst-bad-coerce1.rs:22:29
14   |
15LL |     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
20error[E0308]: mismatched types
21  --> $DIR/dst-bad-coerce1.rs:28:27
22   |
23LL |     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
31error[E0277]: the trait bound `Foo: Bar` is not satisfied
32  --> $DIR/dst-bad-coerce1.rs:34:27
33   |
34LL |     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
39error: aborting due to 4 previous errors
40
41Some errors have detailed explanations: E0277, E0308.
42For more information about an error, try `rustc --explain E0277`.