mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
23 lines
587 B
Plaintext
23 lines
587 B
Plaintext
error: this block may be rewritten with the `?` operator
|
|
--> $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`
|
|
|
|
error: this block may be rewritten with the `?` operator
|
|
--> $DIR/question_mark.rs:47:3
|
|
|
|
|
47 | if (self.opt).is_none() {
|
|
| _________^
|
|
48 | | return None;
|
|
49 | | }
|
|
| |_________^ help: replace_it_with: `(self.opt)?;`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|