summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/pattern_type_mismatch/pattern_tuples.stderr
blob: edd0074d00d3b52228a370642907526e70d1c26c (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
error: type of pattern does not match the expression type
  --> $DIR/pattern_tuples.rs:11:9
   |
LL |     let TupleStruct(_) = 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_tuples.rs:12:25
   |
LL |     if let &TupleStruct(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_tuples.rs:13:24
   |
LL |     if let TupleStruct(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_tuples.rs:30:12
   |
LL |     if let TupleEnum::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_tuples.rs:31:28
   |
LL |     if let &TupleEnum::Var(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_tuples.rs:32:27
   |
LL |     if let TupleEnum::Var(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_tuples.rs:33:12
   |
LL |     if let TupleEnum::Empty = 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_tuples.rs:48:9
   |
LL |     let (_a, _b) = 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_tuples.rs:49:18
   |
LL |     if let &(_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_tuples.rs:50:17
   |
LL |     if let (_a, Some(_)) = *ref_value {}
   |                 ^^^^^^^
   |
   = help: explicitly match against a `&_` pattern and adjust the enclosed variable bindings

error: aborting due to 10 previous errors