2017-12-10 19:47:55 +00:00
|
|
|
error[E0408]: variable `a` is not bound in all patterns
|
2019-08-09 09:43:26 +00:00
|
|
|
--> $DIR/resolve-inconsistent-names.rs:13:12
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | a | b => {}
|
2017-12-10 19:47:55 +00:00
|
|
|
| - ^ pattern doesn't bind `a`
|
|
|
|
| |
|
|
|
|
| variable not in all patterns
|
|
|
|
|
|
|
|
error[E0408]: variable `b` is not bound in all patterns
|
2019-08-09 09:43:26 +00:00
|
|
|
--> $DIR/resolve-inconsistent-names.rs:13:8
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | a | b => {}
|
2017-12-10 19:47:55 +00:00
|
|
|
| ^ - variable not in all patterns
|
|
|
|
| |
|
|
|
|
| pattern doesn't bind `b`
|
|
|
|
|
2019-08-09 09:43:26 +00:00
|
|
|
error[E0408]: variable `A` is not bound in all patterns
|
|
|
|
--> $DIR/resolve-inconsistent-names.rs:19:18
|
|
|
|
|
|
|
|
|
LL | (A, B) | (ref B, c) | (c, A) => ()
|
|
|
|
| - ^^^^^^^^^^ - variable not in all patterns
|
|
|
|
| | |
|
|
|
|
| | pattern doesn't bind `A`
|
|
|
|
| variable not in all patterns
|
|
|
|
|
|
2021-11-17 19:37:46 +00:00
|
|
|
help: if you meant to match on unit variant `E::A`, use the full path in the pattern
|
2019-08-09 09:43:26 +00:00
|
|
|
|
|
2021-11-17 19:37:46 +00:00
|
|
|
LL | (E::A, B) | (ref B, c) | (c, A) => ()
|
|
|
|
| ~~~~
|
2019-08-09 09:43:26 +00:00
|
|
|
|
|
|
|
error[E0408]: variable `B` is not bound in all patterns
|
|
|
|
--> $DIR/resolve-inconsistent-names.rs:19:31
|
|
|
|
|
|
|
|
|
LL | (A, B) | (ref B, c) | (c, A) => ()
|
|
|
|
| - - ^^^^^^ pattern doesn't bind `B`
|
|
|
|
| | |
|
|
|
|
| | variable not in all patterns
|
|
|
|
| variable not in all patterns
|
|
|
|
|
|
|
|
error[E0408]: variable `c` is not bound in all patterns
|
|
|
|
--> $DIR/resolve-inconsistent-names.rs:19:9
|
|
|
|
|
|
|
|
|
LL | (A, B) | (ref B, c) | (c, A) => ()
|
|
|
|
| ^^^^^^ - - variable not in all patterns
|
|
|
|
| | |
|
|
|
|
| | variable not in all patterns
|
|
|
|
| pattern doesn't bind `c`
|
|
|
|
|
2020-03-04 02:58:52 +00:00
|
|
|
error[E0409]: variable `B` is bound inconsistently across alternatives separated by `|`
|
2019-08-09 09:43:26 +00:00
|
|
|
--> $DIR/resolve-inconsistent-names.rs:19:23
|
|
|
|
|
|
|
|
|
LL | (A, B) | (ref B, c) | (c, A) => ()
|
|
|
|
| - ^ bound in different ways
|
|
|
|
| |
|
|
|
|
| first binding
|
|
|
|
|
|
|
|
error[E0408]: variable `CONST1` is not bound in all patterns
|
2022-07-28 00:55:12 +00:00
|
|
|
--> $DIR/resolve-inconsistent-names.rs:31:23
|
2019-08-09 09:43:26 +00:00
|
|
|
|
|
|
|
|
LL | (CONST1, _) | (_, Const2) => ()
|
|
|
|
| ------ ^^^^^^^^^^^ pattern doesn't bind `CONST1`
|
|
|
|
| |
|
|
|
|
| variable not in all patterns
|
|
|
|
|
|
2021-11-17 19:37:46 +00:00
|
|
|
note: you might have meant to match on constant `m::CONST1`, which exists but is inaccessible
|
|
|
|
--> $DIR/resolve-inconsistent-names.rs:6:5
|
2019-08-09 09:43:26 +00:00
|
|
|
|
|
2021-11-17 19:37:46 +00:00
|
|
|
LL | const CONST1: usize = 10;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible
|
2019-08-09 09:43:26 +00:00
|
|
|
|
|
|
|
error[E0408]: variable `Const2` is not bound in all patterns
|
2022-07-28 00:55:12 +00:00
|
|
|
--> $DIR/resolve-inconsistent-names.rs:31:9
|
2019-08-09 09:43:26 +00:00
|
|
|
|
|
|
|
|
LL | (CONST1, _) | (_, Const2) => ()
|
|
|
|
| ^^^^^^^^^^^ ------ variable not in all patterns
|
|
|
|
| |
|
|
|
|
| pattern doesn't bind `Const2`
|
|
|
|
|
|
2021-11-17 19:37:46 +00:00
|
|
|
help: if you meant to match on constant `m::Const2`, use the full path in the pattern
|
2019-08-09 09:43:26 +00:00
|
|
|
|
|
2021-11-17 19:37:46 +00:00
|
|
|
LL | (CONST1, _) | (_, m::Const2) => ()
|
|
|
|
| ~~~~~~~~~
|
2019-08-09 09:43:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/resolve-inconsistent-names.rs:19:19
|
|
|
|
|
|
2019-12-30 08:08:18 +00:00
|
|
|
LL | match x {
|
|
|
|
| - this expression has type `(E, E)`
|
2019-08-09 09:43:26 +00:00
|
|
|
LL | (A, B) | (ref B, c) | (c, A) => ()
|
2023-01-03 02:00:33 +00:00
|
|
|
| - ^^^^^ expected `E`, found `&E`
|
2020-02-25 04:30:43 +00:00
|
|
|
| |
|
|
|
|
| first introduced with type `E` here
|
|
|
|
|
|
|
|
|
= note: in the same arm, a binding must have the same type in all alternatives
|
2022-07-28 00:55:12 +00:00
|
|
|
help: consider removing `ref`
|
|
|
|
|
|
|
|
|
LL - (A, B) | (ref B, c) | (c, A) => ()
|
|
|
|
LL + (A, B) | (B, c) | (c, A) => ()
|
|
|
|
|
|
2019-08-09 09:43:26 +00:00
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
2017-12-10 19:47:55 +00:00
|
|
|
|
2019-08-09 09:43:26 +00:00
|
|
|
Some errors have detailed explanations: E0308, E0408, E0409.
|
|
|
|
For more information about an error, try `rustc --explain E0308`.
|