]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/mismatched_types/E0409.stderr
resolve, inconsistent binding mode: tweak wording.
[rust.git] / src / test / ui / mismatched_types / E0409.stderr
index 098fd74a39da6e88a6a46904a15a7536c611fd9a..ef03b67b1b0b19db03bec5b038bdc717c315cb8b 100644 (file)
@@ -1,4 +1,4 @@
-error[E0409]: variable `y` is bound in inconsistent ways within the same match arm
+error[E0409]: variable `y` is bound inconsistently across alternatives separated by `|`
   --> $DIR/E0409.rs:5:23
    |
 LL |         (0, ref y) | (y, 0) => {}
@@ -9,8 +9,14 @@ LL |         (0, ref y) | (y, 0) => {}
 error[E0308]: mismatched types
   --> $DIR/E0409.rs:5:23
    |
+LL |     match x {
+   |           - this expression has type `({integer}, {integer})`
 LL |         (0, ref y) | (y, 0) => {}
-   |                       ^ expected `&{integer}`, found integer
+   |             -----     ^ expected `&{integer}`, found integer
+   |             |
+   |             first introduced with type `&{integer}` here
+   |
+   = note: in the same arm, a binding must have the same type in all alternatives
 
 error: aborting due to 2 previous errors