]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/mut/mut-pattern-mismatched.stderr
check_pat_ref: use pattern_cause
[rust.git] / src / test / ui / mut / mut-pattern-mismatched.stderr
index d1adc9915196d4c8f6ddd1a378d6b7fc2a839810..cad1cef5155d5f1ba54e81808a613ebbaa467129 100644 (file)
@@ -3,18 +3,24 @@ error[E0308]: mismatched types
    |
 LL |      let &_
    |          ^^ types differ in mutability
+...
+LL |         = foo;
+   |           --- this expression has type `&mut {integer}`
    |
-   = note: expected type `&mut {integer}`
-              found type `&_`
+   = note: expected mutable reference `&mut {integer}`
+                      found reference `&_`
 
 error[E0308]: mismatched types
   --> $DIR/mut-pattern-mismatched.rs:15:9
    |
 LL |     let &mut _
    |         ^^^^^^ types differ in mutability
+...
+LL |          = bar;
+   |            --- this expression has type `&{integer}`
    |
-   = note: expected type `&{integer}`
-              found type `&mut _`
+   = note:      expected reference `&{integer}`
+           found mutable reference `&mut _`
 
 error: aborting due to 2 previous errors