]> git.lizzy.rs Git - rust.git/blob - src/test/ui/dst/dst-bad-coerce2.stderr
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / ui / dst / dst-bad-coerce2.stderr
1 error[E0308]: mismatched types
2   --> $DIR/dst-bad-coerce2.rs:15:33
3    |
4 LL |     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
12 error[E0308]: mismatched types
13   --> $DIR/dst-bad-coerce2.rs:20:33
14    |
15 LL |     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
23 error[E0308]: mismatched types
24   --> $DIR/dst-bad-coerce2.rs:25:31
25    |
26 LL |     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
34 error[E0308]: mismatched types
35   --> $DIR/dst-bad-coerce2.rs:30:31
36    |
37 LL |     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
45 error: aborting due to 4 previous errors
46
47 For more information about this error, try `rustc --explain E0308`.