11error: you seem to be trying to use `match` for an equality check. Consider using `if`
2- --> tests/ui/single_match_else_deref_patterns.rs:6 :5
2+ --> tests/ui/single_match_else_deref_patterns.rs:13 :5
33 |
44LL | / match *"" {
55LL | |
@@ -12,5 +12,177 @@ LL | | }
1212 = note: `-D clippy::single-match` implied by `-D warnings`
1313 = help: to override `-D warnings` add `#[allow(clippy::single_match)]`
1414
15- error: aborting due to 1 previous error
15+ error: you seem to be trying to use `match` for an equality check. Consider using `if`
16+ --> tests/ui/single_match_else_deref_patterns.rs:19:5
17+ |
18+ LL | / match *&*&*&*"" {
19+ LL | |
20+ LL | | "" => {},
21+ LL | | _ => {},
22+ LL | | }
23+ | |_____^ help: try: `if *&*&*&*"" == *"" {}`
24+ |
25+ = note: you might want to preserve the comments from inside the `match`
26+
27+ error: you seem to be trying to use `match` for an equality check. Consider using `if`
28+ --> tests/ui/single_match_else_deref_patterns.rs:25:5
29+ |
30+ LL | / match ***&&"" {
31+ LL | |
32+ LL | | "" => {},
33+ LL | | _ => {},
34+ LL | | }
35+ | |_____^ help: try: `if ***&&"" == *"" {}`
36+ |
37+ = note: you might want to preserve the comments from inside the `match`
38+
39+ error: you seem to be trying to use `match` for an equality check. Consider using `if`
40+ --> tests/ui/single_match_else_deref_patterns.rs:31:5
41+ |
42+ LL | / match *&*&*"" {
43+ LL | |
44+ LL | | "" => {},
45+ LL | | _ => {},
46+ LL | | }
47+ | |_____^ help: try: `if *&*&*"" == *"" {}`
48+ |
49+ = note: you might want to preserve the comments from inside the `match`
50+
51+ error: you seem to be trying to use `match` for an equality check. Consider using `if`
52+ --> tests/ui/single_match_else_deref_patterns.rs:37:5
53+ |
54+ LL | / match **&&*"" {
55+ LL | |
56+ LL | | "" => {},
57+ LL | | _ => {},
58+ LL | | }
59+ | |_____^ help: try: `if **&&*"" == *"" {}`
60+ |
61+ = note: you might want to preserve the comments from inside the `match`
62+
63+ error: you seem to be trying to use `match` for an equality check. Consider using `if`
64+ --> tests/ui/single_match_else_deref_patterns.rs:45:5
65+ |
66+ LL | / match &&&1 {
67+ LL | | &&&2 => unreachable!(),
68+ LL | | _ => {
69+ ... |
70+ LL | | }
71+ | |_____^
72+ |
73+ note: the lint level is defined here
74+ --> tests/ui/single_match_else_deref_patterns.rs:10:9
75+ |
76+ LL | #![deny(clippy::single_match_else)]
77+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
78+ help: try
79+ |
80+ LL ~ if &&&1 == &&&2 { unreachable!() } else {
81+ LL + // ok
82+ LL + }
83+ |
84+
85+ error: you seem to be trying to use `match` for an equality check. Consider using `if`
86+ --> tests/ui/single_match_else_deref_patterns.rs:52:5
87+ |
88+ LL | / match &&&1 {
89+ LL | | &&2 => unreachable!(),
90+ LL | | _ => {
91+ ... |
92+ LL | | }
93+ | |_____^
94+ |
95+ help: try
96+ |
97+ LL ~ if &&1 == &&2 { unreachable!() } else {
98+ LL + // ok
99+ LL + }
100+ |
101+
102+ error: you seem to be trying to use `match` for an equality check. Consider using `if`
103+ --> tests/ui/single_match_else_deref_patterns.rs:59:5
104+ |
105+ LL | / match &&1 {
106+ LL | | &&2 => unreachable!(),
107+ LL | | _ => {
108+ ... |
109+ LL | | }
110+ | |_____^
111+ |
112+ help: try
113+ |
114+ LL ~ if &&1 == &&2 { unreachable!() } else {
115+ LL + // ok
116+ LL + }
117+ |
118+
119+ error: you seem to be trying to use `match` for an equality check. Consider using `if`
120+ --> tests/ui/single_match_else_deref_patterns.rs:66:5
121+ |
122+ LL | / match &&&1 {
123+ LL | | &2 => unreachable!(),
124+ LL | | _ => {
125+ ... |
126+ LL | | }
127+ | |_____^
128+ |
129+ help: try
130+ |
131+ LL ~ if &1 == &2 { unreachable!() } else {
132+ LL + // ok
133+ LL + }
134+ |
135+
136+ error: you seem to be trying to use `match` for an equality check. Consider using `if`
137+ --> tests/ui/single_match_else_deref_patterns.rs:73:5
138+ |
139+ LL | / match &&1 {
140+ LL | | &2 => unreachable!(),
141+ LL | | _ => {
142+ ... |
143+ LL | | }
144+ | |_____^
145+ |
146+ help: try
147+ |
148+ LL ~ if &1 == &2 { unreachable!() } else {
149+ LL + // ok
150+ LL + }
151+ |
152+
153+ error: you seem to be trying to use `match` for an equality check. Consider using `if`
154+ --> tests/ui/single_match_else_deref_patterns.rs:80:5
155+ |
156+ LL | / match &&&1 {
157+ LL | | 2 => unreachable!(),
158+ LL | | _ => {
159+ ... |
160+ LL | | }
161+ | |_____^
162+ |
163+ help: try
164+ |
165+ LL ~ if 1 == 2 { unreachable!() } else {
166+ LL + // ok
167+ LL + }
168+ |
169+
170+ error: you seem to be trying to use `match` for an equality check. Consider using `if`
171+ --> tests/ui/single_match_else_deref_patterns.rs:87:5
172+ |
173+ LL | / match &&1 {
174+ LL | | 2 => unreachable!(),
175+ LL | | _ => {
176+ ... |
177+ LL | | }
178+ | |_____^
179+ |
180+ help: try
181+ |
182+ LL ~ if 1 == 2 { unreachable!() } else {
183+ LL + // ok
184+ LL + }
185+ |
186+
187+ error: aborting due to 12 previous errors
16188
0 commit comments