@@ -2,7 +2,7 @@ error: called `unwrap` on `x` after checking its variant with `is_some`
2
2
--> tests/ui/checked_unwrap/simple_conditionals.rs:46:9
3
3
|
4
4
LL | if x.is_some() {
5
- | -------------- help: try: `if let Some(.. ) = x`
5
+ | -------------- help: try: `if let Some(<item> ) = x`
6
6
LL | // unnecessary
7
7
LL | x.unwrap();
8
8
| ^^^^^^^^^^
@@ -17,7 +17,7 @@ error: called `expect` on `x` after checking its variant with `is_some`
17
17
--> tests/ui/checked_unwrap/simple_conditionals.rs:49:9
18
18
|
19
19
LL | if x.is_some() {
20
- | -------------- help: try: `if let Some(.. ) = x`
20
+ | -------------- help: try: `if let Some(<item> ) = x`
21
21
...
22
22
LL | x.expect("an error message");
23
23
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -59,7 +59,7 @@ error: called `unwrap` on `x` after checking its variant with `is_none`
59
59
--> tests/ui/checked_unwrap/simple_conditionals.rs:65:9
60
60
|
61
61
LL | if x.is_none() {
62
- | -------------- help: try: `if let Some(.. ) = x`
62
+ | -------------- help: try: `if let Some(<item> ) = x`
63
63
...
64
64
LL | x.unwrap();
65
65
| ^^^^^^^^^^
@@ -68,7 +68,7 @@ error: called `unwrap` on `x` after checking its variant with `is_some`
68
68
--> tests/ui/checked_unwrap/simple_conditionals.rs:13:13
69
69
|
70
70
LL | if $a.is_some() {
71
- | --------------- help: try: `if let Some(.. ) = x`
71
+ | --------------- help: try: `if let Some(<item> ) = x`
72
72
LL | // unnecessary
73
73
LL | $a.unwrap();
74
74
| ^^^^^^^^^^^
@@ -82,7 +82,7 @@ error: called `unwrap` on `x` after checking its variant with `is_ok`
82
82
--> tests/ui/checked_unwrap/simple_conditionals.rs:78:9
83
83
|
84
84
LL | if x.is_ok() {
85
- | ------------ help: try: `if let Ok(.. ) = x`
85
+ | ------------ help: try: `if let Ok(<item> ) = x`
86
86
LL | // unnecessary
87
87
LL | x.unwrap();
88
88
| ^^^^^^^^^^
@@ -91,7 +91,7 @@ error: called `expect` on `x` after checking its variant with `is_ok`
91
91
--> tests/ui/checked_unwrap/simple_conditionals.rs:81:9
92
92
|
93
93
LL | if x.is_ok() {
94
- | ------------ help: try: `if let Ok(.. ) = x`
94
+ | ------------ help: try: `if let Ok(<item> ) = x`
95
95
...
96
96
LL | x.expect("an error message");
97
97
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -127,7 +127,7 @@ error: called `unwrap_err` on `x` after checking its variant with `is_ok`
127
127
--> tests/ui/checked_unwrap/simple_conditionals.rs:94:9
128
128
|
129
129
LL | if x.is_ok() {
130
- | ------------ help: try: `if let Err(.. ) = x`
130
+ | ------------ help: try: `if let Err(<item> ) = x`
131
131
...
132
132
LL | x.unwrap_err();
133
133
| ^^^^^^^^^^^^^^
@@ -145,7 +145,7 @@ error: called `unwrap_err` on `x` after checking its variant with `is_err`
145
145
--> tests/ui/checked_unwrap/simple_conditionals.rs:102:9
146
146
|
147
147
LL | if x.is_err() {
148
- | ------------- help: try: `if let Err(.. ) = x`
148
+ | ------------- help: try: `if let Err(<item> ) = x`
149
149
...
150
150
LL | x.unwrap_err();
151
151
| ^^^^^^^^^^^^^^
@@ -154,7 +154,7 @@ error: called `unwrap` on `x` after checking its variant with `is_err`
154
154
--> tests/ui/checked_unwrap/simple_conditionals.rs:106:9
155
155
|
156
156
LL | if x.is_err() {
157
- | ------------- help: try: `if let Ok(.. ) = x`
157
+ | ------------- help: try: `if let Ok(<item> ) = x`
158
158
...
159
159
LL | x.unwrap();
160
160
| ^^^^^^^^^^
@@ -172,7 +172,7 @@ error: called `unwrap` on `option` after checking its variant with `is_some`
172
172
--> tests/ui/checked_unwrap/simple_conditionals.rs:134:9
173
173
|
174
174
LL | if option.is_some() {
175
- | ------------------- help: try: `if let Some(.. ) = &option`
175
+ | ------------------- help: try: `if let Some(<item> ) = &option`
176
176
LL | option.as_ref().unwrap();
177
177
| ^^^^^^^^^^^^^^^^^^^^^^^^
178
178
@@ -189,7 +189,7 @@ error: called `unwrap` on `result` after checking its variant with `is_ok`
189
189
--> tests/ui/checked_unwrap/simple_conditionals.rs:144:9
190
190
|
191
191
LL | if result.is_ok() {
192
- | ----------------- help: try: `if let Ok(.. ) = &result`
192
+ | ----------------- help: try: `if let Ok(<item> ) = &result`
193
193
LL | result.as_ref().unwrap();
194
194
| ^^^^^^^^^^^^^^^^^^^^^^^^
195
195
@@ -206,7 +206,7 @@ error: called `unwrap` on `option` after checking its variant with `is_some`
206
206
--> tests/ui/checked_unwrap/simple_conditionals.rs:153:9
207
207
|
208
208
LL | if option.is_some() {
209
- | ------------------- help: try: `if let Some(.. ) = &mut option`
209
+ | ------------------- help: try: `if let Some(<item> ) = &mut option`
210
210
LL | option.as_mut().unwrap();
211
211
| ^^^^^^^^^^^^^^^^^^^^^^^^
212
212
@@ -223,7 +223,7 @@ error: called `unwrap` on `result` after checking its variant with `is_ok`
223
223
--> tests/ui/checked_unwrap/simple_conditionals.rs:162:9
224
224
|
225
225
LL | if result.is_ok() {
226
- | ----------------- help: try: `if let Ok(.. ) = &mut result`
226
+ | ----------------- help: try: `if let Ok(<item> ) = &mut result`
227
227
LL | result.as_mut().unwrap();
228
228
| ^^^^^^^^^^^^^^^^^^^^^^^^
229
229
0 commit comments