rust-clippy/tests/ui/question_mark.stderr

23 lines
587 B
Text
Raw Normal View History

2018-01-30 23:09:16 +00:00
error: this block may be rewritten with the `?` operator
2018-10-06 16:18:06 +00:00
--> $DIR/question_mark.rs:12:2
|
12 | if a.is_none() {
| _____^
13 | | return None
14 | | }
| |_____^ help: replace_it_with: `a?;`
|
= note: `-D clippy::question-mark` implied by `-D warnings`
2018-01-30 23:09:16 +00:00
error: this block may be rewritten with the `?` operator
2018-10-06 16:18:06 +00:00
--> $DIR/question_mark.rs:47:3
2018-01-30 23:09:16 +00:00
|
2018-10-06 16:18:06 +00:00
47 | if (self.opt).is_none() {
2018-01-30 23:09:16 +00:00
| _________^
2018-10-06 16:18:06 +00:00
48 | | return None;
49 | | }
2018-01-30 23:09:16 +00:00
| |_________^ help: replace_it_with: `(self.opt)?;`
error: aborting due to 2 previous errors