fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
1.5 KiB47 linesraw
1error[E0308]: mismatched types
2  --> $DIR/dst-bad-coerce2.rs:15:33
3   |
4LL |     let f3: &mut Fat<[isize]> = f2;
5   |             -----------------   ^^ types differ in mutability
6   |             |
7   |             expected due to this
8   |
9   = note: expected mutable reference `&mut Fat<[isize]>`
10                      found reference `&Fat<[isize; 3]>`
11
12error[E0308]: mismatched types
13  --> $DIR/dst-bad-coerce2.rs:20:33
14   |
15LL |     let f3: &mut Fat<dyn Bar> = f2;
16   |             -----------------   ^^ types differ in mutability
17   |             |
18   |             expected due to this
19   |
20   = note: expected mutable reference `&mut Fat<dyn Bar>`
21                      found reference `&Fat<Foo>`
22
23error[E0308]: mismatched types
24  --> $DIR/dst-bad-coerce2.rs:25:31
25   |
26LL |     let f3: &mut ([isize],) = f2;
27   |             ---------------   ^^ types differ in mutability
28   |             |
29   |             expected due to this
30   |
31   = note: expected mutable reference `&mut ([isize],)`
32                      found reference `&([isize; 3],)`
33
34error[E0308]: mismatched types
35  --> $DIR/dst-bad-coerce2.rs:30:31
36   |
37LL |     let f3: &mut (dyn Bar,) = f2;
38   |             ---------------   ^^ types differ in mutability
39   |             |
40   |             expected due to this
41   |
42   = note: expected mutable reference `&mut (dyn Bar,)`
43                      found reference `&(Foo,)`
44
45error: aborting due to 4 previous errors
46
47For more information about this error, try `rustc --explain E0308`.