summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/pattern_type_mismatch/pattern_structs.stderr
blob: d428e85b0c91403be6c9356fe3a383eb1a61d2ea (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
error: type of pattern does not match the expression type
  --> $DIR/pattern_structs.rs:13:9
   |
LL |     let Struct { .. } = 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_structs.rs:14:33
   |
LL |     if let &Struct { ref_inner: 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_structs.rs:15:32
   |
LL |     if let Struct { ref_inner: 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_structs.rs:32:12
   |
LL |     if let StructEnum::Var { .. } = ref_value {}
   |            ^^^^^^^^^^^^^^^^^^^^^^
   |
   = 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_structs.rs:33:12
   |
LL |     if let StructEnum::Var { inner_ref: Some(_) } = ref_value {}
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = 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_structs.rs:34:42
   |
LL |     if let &StructEnum::Var { inner_ref: 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_structs.rs:35:41
   |
LL |     if let StructEnum::Var { inner_ref: 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_structs.rs:36:12
   |
LL |     if let StructEnum::Empty = ref_value {}
   |            ^^^^^^^^^^^^^^^^^
   |
   = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings

error: aborting due to 8 previous errors