11error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
2- --> tests/ui/single_match.rs:17 :5
2+ --> tests/ui/single_match.rs:15 :5
33 |
44LL | / match x {
55LL | | Some(y) => {
@@ -19,7 +19,7 @@ LL ~ };
1919 |
2020
2121error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
22- --> tests/ui/single_match.rs:25 :5
22+ --> tests/ui/single_match.rs:23 :5
2323 |
2424LL | / match x {
2525LL | | // Note the missing block braces.
@@ -31,7 +31,7 @@ LL | | }
3131 | |_____^ help: try: `if let Some(y) = x { println!("{:?}", y) }`
3232
3333error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
34- --> tests/ui/single_match.rs:34 :5
34+ --> tests/ui/single_match.rs:32 :5
3535 |
3636LL | / match z {
3737LL | | (2..=3, 7..=9) => dummy(),
@@ -40,7 +40,7 @@ LL | | };
4040 | |_____^ help: try: `if let (2..=3, 7..=9) = z { dummy() }`
4141
4242error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
43- --> tests/ui/single_match.rs:63 :5
43+ --> tests/ui/single_match.rs:61 :5
4444 |
4545LL | / match x {
4646LL | | Some(y) => dummy(),
@@ -49,7 +49,7 @@ LL | | };
4949 | |_____^ help: try: `if let Some(y) = x { dummy() }`
5050
5151error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
52- --> tests/ui/single_match.rs:68 :5
52+ --> tests/ui/single_match.rs:66 :5
5353 |
5454LL | / match y {
5555LL | | Ok(y) => dummy(),
@@ -58,7 +58,7 @@ LL | | };
5858 | |_____^ help: try: `if let Ok(y) = y { dummy() }`
5959
6060error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
61- --> tests/ui/single_match.rs:75 :5
61+ --> tests/ui/single_match.rs:73 :5
6262 |
6363LL | / match c {
6464LL | | Cow::Borrowed(..) => dummy(),
@@ -67,7 +67,7 @@ LL | | };
6767 | |_____^ help: try: `if let Cow::Borrowed(..) = c { dummy() }`
6868
6969error: you seem to be trying to use `match` for an equality check. Consider using `if`
70- --> tests/ui/single_match.rs:96 :5
70+ --> tests/ui/single_match.rs:94 :5
7171 |
7272LL | / match x {
7373LL | | "test" => println!(),
@@ -76,7 +76,7 @@ LL | | }
7676 | |_____^ help: try: `if x == "test" { println!() }`
7777
7878error: you seem to be trying to use `match` for an equality check. Consider using `if`
79- --> tests/ui/single_match.rs:109 :5
79+ --> tests/ui/single_match.rs:107 :5
8080 |
8181LL | / match x {
8282LL | | Foo::A => println!(),
@@ -85,7 +85,7 @@ LL | | }
8585 | |_____^ help: try: `if x == Foo::A { println!() }`
8686
8787error: you seem to be trying to use `match` for an equality check. Consider using `if`
88- --> tests/ui/single_match.rs:115 :5
88+ --> tests/ui/single_match.rs:113 :5
8989 |
9090LL | / match x {
9191LL | | FOO_C => println!(),
@@ -94,7 +94,7 @@ LL | | }
9494 | |_____^ help: try: `if x == FOO_C { println!() }`
9595
9696error: you seem to be trying to use `match` for an equality check. Consider using `if`
97- --> tests/ui/single_match.rs:120 :5
97+ --> tests/ui/single_match.rs:118 :5
9898 |
9999LL | / match &&x {
100100LL | | Foo::A => println!(),
@@ -103,7 +103,7 @@ LL | | }
103103 | |_____^ help: try: `if x == Foo::A { println!() }`
104104
105105error: you seem to be trying to use `match` for an equality check. Consider using `if`
106- --> tests/ui/single_match.rs:126 :5
106+ --> tests/ui/single_match.rs:124 :5
107107 |
108108LL | / match &x {
109109LL | | Foo::A => println!(),
@@ -112,7 +112,7 @@ LL | | }
112112 | |_____^ help: try: `if x == &Foo::A { println!() }`
113113
114114error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
115- --> tests/ui/single_match.rs:143 :5
115+ --> tests/ui/single_match.rs:141 :5
116116 |
117117LL | / match x {
118118LL | | Bar::A => println!(),
@@ -121,7 +121,7 @@ LL | | }
121121 | |_____^ help: try: `if let Bar::A = x { println!() }`
122122
123123error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
124- --> tests/ui/single_match.rs:151 :5
124+ --> tests/ui/single_match.rs:149 :5
125125 |
126126LL | / match x {
127127LL | | None => println!(),
@@ -130,7 +130,7 @@ LL | | };
130130 | |_____^ help: try: `if let None = x { println!() }`
131131
132132error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
133- --> tests/ui/single_match.rs:173 :5
133+ --> tests/ui/single_match.rs:171 :5
134134 |
135135LL | / match x {
136136LL | | (Some(_), _) => {},
@@ -139,7 +139,7 @@ LL | | }
139139 | |_____^ help: try: `if let (Some(_), _) = x {}`
140140
141141error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
142- --> tests/ui/single_match.rs:179 :5
142+ --> tests/ui/single_match.rs:177 :5
143143 |
144144LL | / match x {
145145LL | | (Some(E::V), _) => todo!(),
@@ -148,7 +148,7 @@ LL | | }
148148 | |_____^ help: try: `if let (Some(E::V), _) = x { todo!() }`
149149
150150error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
151- --> tests/ui/single_match.rs:185 :5
151+ --> tests/ui/single_match.rs:183 :5
152152 |
153153LL | / match (Some(42), Some(E::V), Some(42)) {
154154LL | | (.., Some(E::V), _) => {},
@@ -157,7 +157,7 @@ LL | | }
157157 | |_____^ help: try: `if let (.., Some(E::V), _) = (Some(42), Some(E::V), Some(42)) {}`
158158
159159error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
160- --> tests/ui/single_match.rs:257 :5
160+ --> tests/ui/single_match.rs:255 :5
161161 |
162162LL | / match bar {
163163LL | | Some(v) => unsafe {
@@ -177,7 +177,7 @@ LL + } }
177177 |
178178
179179error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
180- --> tests/ui/single_match.rs:265 :5
180+ --> tests/ui/single_match.rs:263 :5
181181 |
182182LL | / match bar {
183183LL | | #[rustfmt::skip]
0 commit comments