@@ -2,7 +2,7 @@ error: called `unwrap` on `x` after checking its variant with `is_some`
22 --> tests/ui/checked_unwrap/simple_conditionals.rs:46:9
33 |
44LL | if x.is_some() {
5- | -------------- help: try: `if let Some(.. ) = x`
5+ | -------------- help: try: `if let Some(<item> ) = x`
66LL | // unnecessary
77LL | x.unwrap();
88 | ^^^^^^^^^^
@@ -17,7 +17,7 @@ error: called `expect` on `x` after checking its variant with `is_some`
1717 --> tests/ui/checked_unwrap/simple_conditionals.rs:49:9
1818 |
1919LL | if x.is_some() {
20- | -------------- help: try: `if let Some(.. ) = x`
20+ | -------------- help: try: `if let Some(<item> ) = x`
2121...
2222LL | x.expect("an error message");
2323 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -59,7 +59,7 @@ error: called `unwrap` on `x` after checking its variant with `is_none`
5959 --> tests/ui/checked_unwrap/simple_conditionals.rs:65:9
6060 |
6161LL | if x.is_none() {
62- | -------------- help: try: `if let Some(.. ) = x`
62+ | -------------- help: try: `if let Some(<item> ) = x`
6363...
6464LL | x.unwrap();
6565 | ^^^^^^^^^^
@@ -68,7 +68,7 @@ error: called `unwrap` on `x` after checking its variant with `is_some`
6868 --> tests/ui/checked_unwrap/simple_conditionals.rs:13:13
6969 |
7070LL | if $a.is_some() {
71- | --------------- help: try: `if let Some(.. ) = x`
71+ | --------------- help: try: `if let Some(<item> ) = x`
7272LL | // unnecessary
7373LL | $a.unwrap();
7474 | ^^^^^^^^^^^
@@ -82,7 +82,7 @@ error: called `unwrap` on `x` after checking its variant with `is_ok`
8282 --> tests/ui/checked_unwrap/simple_conditionals.rs:78:9
8383 |
8484LL | if x.is_ok() {
85- | ------------ help: try: `if let Ok(.. ) = x`
85+ | ------------ help: try: `if let Ok(<item> ) = x`
8686LL | // unnecessary
8787LL | x.unwrap();
8888 | ^^^^^^^^^^
@@ -91,7 +91,7 @@ error: called `expect` on `x` after checking its variant with `is_ok`
9191 --> tests/ui/checked_unwrap/simple_conditionals.rs:81:9
9292 |
9393LL | if x.is_ok() {
94- | ------------ help: try: `if let Ok(.. ) = x`
94+ | ------------ help: try: `if let Ok(<item> ) = x`
9595...
9696LL | x.expect("an error message");
9797 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -127,7 +127,7 @@ error: called `unwrap_err` on `x` after checking its variant with `is_ok`
127127 --> tests/ui/checked_unwrap/simple_conditionals.rs:94:9
128128 |
129129LL | if x.is_ok() {
130- | ------------ help: try: `if let Err(.. ) = x`
130+ | ------------ help: try: `if let Err(<item> ) = x`
131131...
132132LL | x.unwrap_err();
133133 | ^^^^^^^^^^^^^^
@@ -145,7 +145,7 @@ error: called `unwrap_err` on `x` after checking its variant with `is_err`
145145 --> tests/ui/checked_unwrap/simple_conditionals.rs:102:9
146146 |
147147LL | if x.is_err() {
148- | ------------- help: try: `if let Err(.. ) = x`
148+ | ------------- help: try: `if let Err(<item> ) = x`
149149...
150150LL | x.unwrap_err();
151151 | ^^^^^^^^^^^^^^
@@ -154,7 +154,7 @@ error: called `unwrap` on `x` after checking its variant with `is_err`
154154 --> tests/ui/checked_unwrap/simple_conditionals.rs:106:9
155155 |
156156LL | if x.is_err() {
157- | ------------- help: try: `if let Ok(.. ) = x`
157+ | ------------- help: try: `if let Ok(<item> ) = x`
158158...
159159LL | x.unwrap();
160160 | ^^^^^^^^^^
@@ -172,7 +172,7 @@ error: called `unwrap` on `option` after checking its variant with `is_some`
172172 --> tests/ui/checked_unwrap/simple_conditionals.rs:134:9
173173 |
174174LL | if option.is_some() {
175- | ------------------- help: try: `if let Some(.. ) = &option`
175+ | ------------------- help: try: `if let Some(<item> ) = &option`
176176LL | option.as_ref().unwrap();
177177 | ^^^^^^^^^^^^^^^^^^^^^^^^
178178
@@ -189,7 +189,7 @@ error: called `unwrap` on `result` after checking its variant with `is_ok`
189189 --> tests/ui/checked_unwrap/simple_conditionals.rs:144:9
190190 |
191191LL | if result.is_ok() {
192- | ----------------- help: try: `if let Ok(.. ) = &result`
192+ | ----------------- help: try: `if let Ok(<item> ) = &result`
193193LL | result.as_ref().unwrap();
194194 | ^^^^^^^^^^^^^^^^^^^^^^^^
195195
@@ -206,7 +206,7 @@ error: called `unwrap` on `option` after checking its variant with `is_some`
206206 --> tests/ui/checked_unwrap/simple_conditionals.rs:153:9
207207 |
208208LL | if option.is_some() {
209- | ------------------- help: try: `if let Some(.. ) = &mut option`
209+ | ------------------- help: try: `if let Some(<item> ) = &mut option`
210210LL | option.as_mut().unwrap();
211211 | ^^^^^^^^^^^^^^^^^^^^^^^^
212212
@@ -223,7 +223,7 @@ error: called `unwrap` on `result` after checking its variant with `is_ok`
223223 --> tests/ui/checked_unwrap/simple_conditionals.rs:162:9
224224 |
225225LL | if result.is_ok() {
226- | ----------------- help: try: `if let Ok(.. ) = &mut result`
226+ | ----------------- help: try: `if let Ok(<item> ) = &mut result`
227227LL | result.as_mut().unwrap();
228228 | ^^^^^^^^^^^^^^^^^^^^^^^^
229229
0 commit comments