rust/tests/ui/question_mark.stderr
2018-12-19 20:50:18 +01:00

64 lines
1.8 KiB
Plaintext

error: this block may be rewritten with the `?` operator
--> $DIR/question_mark.rs:11:5
|
11 | / if a.is_none() {
12 | | return None;
13 | | }
| |_____^ help: replace_it_with: `a?;`
|
= note: `-D clippy::question-mark` implied by `-D warnings`
error: this block may be rewritten with the `?` operator
--> $DIR/question_mark.rs:56:9
|
56 | / if (self.opt).is_none() {
57 | | return None;
58 | | }
| |_________^ help: replace_it_with: `(self.opt)?;`
error: this block may be rewritten with the `?` operator
--> $DIR/question_mark.rs:60:9
|
60 | / if self.opt.is_none() {
61 | | return None
62 | | }
| |_________^ help: replace_it_with: `self.opt?;`
error: this block may be rewritten with the `?` operator
--> $DIR/question_mark.rs:64:17
|
64 | let _ = if self.opt.is_none() {
| _________________^
65 | | return None;
66 | | } else {
67 | | self.opt
68 | | };
| |_________^ help: replace_it_with: `Some(self.opt?)`
error: this block may be rewritten with the `?` operator
--> $DIR/question_mark.rs:81:9
|
81 | / if self.opt.is_none() {
82 | | return None;
83 | | }
| |_________^ help: replace_it_with: `self.opt.as_ref()?;`
error: this block may be rewritten with the `?` operator
--> $DIR/question_mark.rs:89:9
|
89 | / if self.opt.is_none() {
90 | | return None;
91 | | }
| |_________^ help: replace_it_with: `self.opt.as_ref()?;`
error: this block may be rewritten with the `?` operator
--> $DIR/question_mark.rs:97:9
|
97 | / if self.opt.is_none() {
98 | | return None;
99 | | }
| |_________^ help: replace_it_with: `self.opt.as_ref()?;`
error: aborting due to 7 previous errors