When encountering a binding that could be a const or unit variant, suggest the right path
This commit is contained in:
parent
05c07386b4
commit
09f3ea1692
8 changed files with 131 additions and 77 deletions
|
|
@ -103,6 +103,22 @@ LL | let (A(A(a, b) | B(c), d) | B(e)) = Y;
|
|||
| |
|
||||
| pattern doesn't bind `c`
|
||||
|
||||
error[E0408]: variable `d` is not bound in all patterns
|
||||
--> $DIR/missing-bindings.rs:45:33
|
||||
|
|
||||
LL | let (A(A(a, b) | B(c), d) | B(e)) = Y;
|
||||
| - ^^^^ pattern doesn't bind `d`
|
||||
| |
|
||||
| variable not in all patterns
|
||||
|
||||
error[E0408]: variable `e` is not bound in all patterns
|
||||
--> $DIR/missing-bindings.rs:45:10
|
||||
|
|
||||
LL | let (A(A(a, b) | B(c), d) | B(e)) = Y;
|
||||
| ^^^^^^^^^^^^^^^^^^^^ - variable not in all patterns
|
||||
| |
|
||||
| pattern doesn't bind `e`
|
||||
|
||||
error[E0408]: variable `a` is not bound in all patterns
|
||||
--> $DIR/missing-bindings.rs:45:33
|
||||
|
|
||||
|
|
@ -127,22 +143,6 @@ LL | let (A(A(a, b) | B(c), d) | B(e)) = Y;
|
|||
| |
|
||||
| variable not in all patterns
|
||||
|
||||
error[E0408]: variable `d` is not bound in all patterns
|
||||
--> $DIR/missing-bindings.rs:45:33
|
||||
|
|
||||
LL | let (A(A(a, b) | B(c), d) | B(e)) = Y;
|
||||
| - ^^^^ pattern doesn't bind `d`
|
||||
| |
|
||||
| variable not in all patterns
|
||||
|
||||
error[E0408]: variable `e` is not bound in all patterns
|
||||
--> $DIR/missing-bindings.rs:45:10
|
||||
|
|
||||
LL | let (A(A(a, b) | B(c), d) | B(e)) = Y;
|
||||
| ^^^^^^^^^^^^^^^^^^^^ - variable not in all patterns
|
||||
| |
|
||||
| pattern doesn't bind `e`
|
||||
|
||||
error[E0408]: variable `a` is not bound in all patterns
|
||||
--> $DIR/missing-bindings.rs:61:29
|
||||
|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue