]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/mismatched_types/E0409.stderr
New upstream version 1.43.0+dfsg1
[rustc.git] / src / test / ui / mismatched_types / E0409.stderr
index 2306fb352738f80ef17a57d06ce6e1f8522f1e4c..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) => {}
@@ -12,7 +12,11 @@ error[E0308]: mismatched types
 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