]> git.lizzy.rs Git - rust.git/blob - tests/ui/question_mark.stderr
Merge remote-tracking branch 'origin/beta_backport' into HEAD
[rust.git] / tests / ui / question_mark.stderr
1 error: this block may be rewritten with the `?` operator
2   --> $DIR/question_mark.rs:2:5
3    |
4 LL | /     if a.is_none() {
5 LL | |         return None;
6 LL | |     }
7    | |_____^ help: replace_it_with: `a?;`
8    |
9    = note: `-D clippy::question-mark` implied by `-D warnings`
10
11 error: this block may be rewritten with the `?` operator
12   --> $DIR/question_mark.rs:47:9
13    |
14 LL | /         if (self.opt).is_none() {
15 LL | |             return None;
16 LL | |         }
17    | |_________^ help: replace_it_with: `(self.opt)?;`
18
19 error: this block may be rewritten with the `?` operator
20   --> $DIR/question_mark.rs:51:9
21    |
22 LL | /         if self.opt.is_none() {
23 LL | |             return None
24 LL | |         }
25    | |_________^ help: replace_it_with: `self.opt?;`
26
27 error: this block may be rewritten with the `?` operator
28   --> $DIR/question_mark.rs:55:17
29    |
30 LL |           let _ = if self.opt.is_none() {
31    |  _________________^
32 LL | |             return None;
33 LL | |         } else {
34 LL | |             self.opt
35 LL | |         };
36    | |_________^ help: replace_it_with: `Some(self.opt?)`
37
38 error: this block may be rewritten with the `?` operator
39   --> $DIR/question_mark.rs:72:9
40    |
41 LL | /         if self.opt.is_none() {
42 LL | |             return None;
43 LL | |         }
44    | |_________^ help: replace_it_with: `self.opt.as_ref()?;`
45
46 error: this block may be rewritten with the `?` operator
47   --> $DIR/question_mark.rs:80:9
48    |
49 LL | /         if self.opt.is_none() {
50 LL | |             return None;
51 LL | |         }
52    | |_________^ help: replace_it_with: `self.opt.as_ref()?;`
53
54 error: this block may be rewritten with the `?` operator
55   --> $DIR/question_mark.rs:88:9
56    |
57 LL | /         if self.opt.is_none() {
58 LL | |             return None;
59 LL | |         }
60    | |_________^ help: replace_it_with: `self.opt.as_ref()?;`
61
62 error: aborting due to 7 previous errors
63