blob: a91b5ac6cf742722b122f605d4ced009a1c3c1a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
error: type of pattern does not match the expression type
--> $DIR/pattern_alternatives.rs:15:12
|
LL | if let Value::B | Value::A(_) = ref_value {}
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
= note: `-D clippy::pattern-type-mismatch` implied by `-D warnings`
error: type of pattern does not match the expression type
--> $DIR/pattern_alternatives.rs:16:34
|
LL | if let &Value::B | &Value::A(Some(_)) = ref_value {}
| ^^^^^^^
|
= help: explicitly match against a `&_` pattern and adjust the enclosed variable bindings
error: type of pattern does not match the expression type
--> $DIR/pattern_alternatives.rs:17:32
|
LL | if let Value::B | Value::A(Some(_)) = *ref_value {}
| ^^^^^^^
|
= help: explicitly match against a `&_` pattern and adjust the enclosed variable bindings
error: aborting due to 3 previous errors
|