1 error: this block may be rewritten with the `?` operator
2 --> $DIR/question_mark.rs:7:5
4 LL | / if a.is_none() {
7 | |_____^ help: replace it with: `a?;`
9 = note: `-D clippy::question-mark` implied by `-D warnings`
11 error: this block may be rewritten with the `?` operator
12 --> $DIR/question_mark.rs:52:9
14 LL | / if (self.opt).is_none() {
17 | |_________^ help: replace it with: `(self.opt)?;`
19 error: this block may be rewritten with the `?` operator
20 --> $DIR/question_mark.rs:56:9
22 LL | / if self.opt.is_none() {
25 | |_________^ help: replace it with: `self.opt?;`
27 error: this block may be rewritten with the `?` operator
28 --> $DIR/question_mark.rs:60:17
30 LL | let _ = if self.opt.is_none() {
36 | |_________^ help: replace it with: `Some(self.opt?)`
38 error: this block may be rewritten with the `?` operator
39 --> $DIR/question_mark.rs:66:17
41 LL | let _ = if let Some(x) = self.opt {
47 | |_________^ help: replace it with: `self.opt?`
49 error: this block may be rewritten with the `?` operator
50 --> $DIR/question_mark.rs:83:9
52 LL | / if self.opt.is_none() {
55 | |_________^ help: replace it with: `self.opt.as_ref()?;`
57 error: this block may be rewritten with the `?` operator
58 --> $DIR/question_mark.rs:91:9
60 LL | / if self.opt.is_none() {
63 | |_________^ help: replace it with: `self.opt.as_ref()?;`
65 error: this block may be rewritten with the `?` operator
66 --> $DIR/question_mark.rs:99:9
68 LL | / if self.opt.is_none() {
71 | |_________^ help: replace it with: `self.opt.as_ref()?;`
73 error: this block may be rewritten with the `?` operator
74 --> $DIR/question_mark.rs:106:26
76 LL | let v: &Vec<_> = if let Some(ref v) = self.opt {
77 | __________________________^
82 | |_________^ help: replace it with: `self.opt.as_ref()?`
84 error: this block may be rewritten with the `?` operator
85 --> $DIR/question_mark.rs:116:17
87 LL | let v = if let Some(v) = self.opt {
93 | |_________^ help: replace it with: `self.opt?`
95 error: this block may be rewritten with the `?` operator
96 --> $DIR/question_mark.rs:131:5
98 LL | / if f().is_none() {
101 | |_____^ help: replace it with: `f()?;`
103 error: this block may be rewritten with the `?` operator
104 --> $DIR/question_mark.rs:143:13
106 LL | let _ = if let Ok(x) = x { x } else { return x };
107 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x?`
109 error: this block may be rewritten with the `?` operator
110 --> $DIR/question_mark.rs:145:5
112 LL | / if x.is_err() {
115 | |_____^ help: replace it with: `x?;`
117 error: this block may be rewritten with the `?` operator
118 --> $DIR/question_mark.rs:193:5
120 LL | / if let Err(err) = func_returning_result() {
121 LL | | return Err(err);
123 | |_____^ help: replace it with: `func_returning_result()?;`
125 error: this block may be rewritten with the `?` operator
126 --> $DIR/question_mark.rs:200:5
128 LL | / if let Err(err) = func_returning_result() {
129 LL | | return Err(err);
131 | |_____^ help: replace it with: `func_returning_result()?;`
133 error: aborting due to 15 previous errors