We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74ae9b1 commit 05ed421Copy full SHA for 05ed421
tests/ui/question_mark.stderr
@@ -0,0 +1,22 @@
1
+error: this block may be rewritten with the `?` operator
2
+ --> $DIR/question_mark.rs:2:2
3
+ |
4
+2 | if a.is_none() {
5
+ | _____^
6
+3 | | return None
7
+4 | | }
8
+ | |_____^ help: replace_it_with: `a?;`
9
10
+ = note: `-D question-mark` implied by `-D warnings`
11
+
12
13
+ --> $DIR/question_mark.rs:37:3
14
15
+37 | if (self.opt).is_none() {
16
+ | _________^
17
+38 | | return None;
18
+39 | | }
19
+ | |_________^ help: replace_it_with: `(self.opt)?;`
20
21
+error: aborting due to 2 previous errors
22
0 commit comments