summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/pattern_type_mismatch/pattern_alternatives.stderr
blob: d285c93782c67962664f2a0e048d428307b8b3f7 (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 {}
   |            ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings`
   = help: use `*` to dereference the match expression or 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: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