summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/question_mark.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/question_mark.stderr')
-rw-r--r--src/tools/clippy/tests/ui/question_mark.stderr33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/tools/clippy/tests/ui/question_mark.stderr b/src/tools/clippy/tests/ui/question_mark.stderr
index 62489c8c8..7b7b85d08 100644
--- a/src/tools/clippy/tests/ui/question_mark.stderr
+++ b/src/tools/clippy/tests/ui/question_mark.stderr
@@ -1,5 +1,5 @@
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:8:5
+ --> $DIR/question_mark.rs:7:5
|
LL | / if a.is_none() {
LL | | return None;
@@ -7,9 +7,10 @@ LL | | }
| |_____^ help: replace it with: `a?;`
|
= note: `-D clippy::question-mark` implied by `-D warnings`
+ = help: to override `-D warnings` add `#[allow(clippy::question_mark)]`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:53:9
+ --> $DIR/question_mark.rs:52:9
|
LL | / if (self.opt).is_none() {
LL | | return None;
@@ -17,7 +18,7 @@ LL | | }
| |_________^ help: replace it with: `(self.opt)?;`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:57:9
+ --> $DIR/question_mark.rs:56:9
|
LL | / if self.opt.is_none() {
LL | | return None
@@ -25,7 +26,7 @@ LL | | }
| |_________^ help: replace it with: `self.opt?;`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:61:17
+ --> $DIR/question_mark.rs:60:17
|
LL | let _ = if self.opt.is_none() {
| _________________^
@@ -36,7 +37,7 @@ LL | | };
| |_________^ help: replace it with: `Some(self.opt?)`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:67:17
+ --> $DIR/question_mark.rs:66:17
|
LL | let _ = if let Some(x) = self.opt {
| _________________^
@@ -47,7 +48,7 @@ LL | | };
| |_________^ help: replace it with: `self.opt?`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:84:9
+ --> $DIR/question_mark.rs:83:9
|
LL | / if self.opt.is_none() {
LL | | return None;
@@ -55,7 +56,7 @@ LL | | }
| |_________^ help: replace it with: `self.opt.as_ref()?;`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:92:9
+ --> $DIR/question_mark.rs:91:9
|
LL | / if self.opt.is_none() {
LL | | return None;
@@ -63,7 +64,7 @@ LL | | }
| |_________^ help: replace it with: `self.opt.as_ref()?;`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:100:9
+ --> $DIR/question_mark.rs:99:9
|
LL | / if self.opt.is_none() {
LL | | return None;
@@ -71,7 +72,7 @@ LL | | }
| |_________^ help: replace it with: `self.opt.as_ref()?;`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:107:26
+ --> $DIR/question_mark.rs:106:26
|
LL | let v: &Vec<_> = if let Some(ref v) = self.opt {
| __________________________^
@@ -82,7 +83,7 @@ LL | | };
| |_________^ help: replace it with: `self.opt.as_ref()?`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:117:17
+ --> $DIR/question_mark.rs:116:17
|
LL | let v = if let Some(v) = self.opt {
| _________________^
@@ -93,7 +94,7 @@ LL | | };
| |_________^ help: replace it with: `self.opt?`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:132:5
+ --> $DIR/question_mark.rs:131:5
|
LL | / if f().is_none() {
LL | | return None;
@@ -101,13 +102,13 @@ LL | | }
| |_____^ help: replace it with: `f()?;`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:144:13
+ --> $DIR/question_mark.rs:143:13
|
LL | let _ = if let Ok(x) = x { x } else { return x };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x?`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:146:5
+ --> $DIR/question_mark.rs:145:5
|
LL | / if x.is_err() {
LL | | return x;
@@ -115,7 +116,7 @@ LL | | }
| |_____^ help: replace it with: `x?;`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:214:5
+ --> $DIR/question_mark.rs:213:5
|
LL | / if let Err(err) = func_returning_result() {
LL | | return Err(err);
@@ -123,7 +124,7 @@ LL | | }
| |_____^ help: replace it with: `func_returning_result()?;`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:221:5
+ --> $DIR/question_mark.rs:220:5
|
LL | / if let Err(err) = func_returning_result() {
LL | | return Err(err);
@@ -131,7 +132,7 @@ LL | | }
| |_____^ help: replace it with: `func_returning_result()?;`
error: this block may be rewritten with the `?` operator
- --> $DIR/question_mark.rs:298:13
+ --> $DIR/question_mark.rs:297:13
|
LL | / if a.is_none() {
LL | | return None;