fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
1.2 KiB38 linesraw
1error[E0308]: mismatched types
2  --> $DIR/dst-bad-coerce1.rs:16:29
3   |
4LL |     let f3: &Fat<[usize]> = f2;
5   |                             ^^ expected slice, found array of 3 elements
6   |
7   = note: expected type `&Fat<[usize]>`
8              found type `&Fat<[isize; 3]>`
9
10error[E0277]: the trait bound `Foo: Bar` is not satisfied
11  --> $DIR/dst-bad-coerce1.rs:22:29
12   |
13LL |     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
18error[E0308]: mismatched types
19  --> $DIR/dst-bad-coerce1.rs:28:27
20   |
21LL |     let f3: &([usize],) = f2;
22   |                           ^^ expected slice, found array of 3 elements
23   |
24   = note: expected type `&([usize],)`
25              found type `&([isize; 3],)`
26
27error[E0277]: the trait bound `Foo: Bar` is not satisfied
28  --> $DIR/dst-bad-coerce1.rs:34:27
29   |
30LL |     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
35error: aborting due to 4 previous errors
36
37Some errors have detailed explanations: E0277, E0308.
38For more information about an error, try `rustc --explain E0277`.