]> git.lizzy.rs Git - rust.git/blob - tests/ui/mut/mut-pattern-mismatched.stderr
Rollup merge of #106805 - madsravn:master, r=compiler-errors
[rust.git] / tests / ui / mut / mut-pattern-mismatched.stderr
1 error[E0308]: mismatched types
2   --> $DIR/mut-pattern-mismatched.rs:6:10
3    |
4 LL |      let &_
5    |          ^^ types differ in mutability
6 ...
7 LL |         = foo;
8    |           --- this expression has type `&mut {integer}`
9    |
10    = note: expected mutable reference `&mut {integer}`
11                       found reference `&_`
12
13 error[E0308]: mismatched types
14   --> $DIR/mut-pattern-mismatched.rs:15:9
15    |
16 LL |     let &mut _
17    |         ^^^^^^ types differ in mutability
18 ...
19 LL |          = bar;
20    |            --- this expression has type `&{integer}`
21    |
22    = note:      expected reference `&{integer}`
23            found mutable reference `&mut _`
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0308`.