summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/collapsible_match2.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/collapsible_match2.stderr')
-rw-r--r--src/tools/clippy/tests/ui/collapsible_match2.stderr25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/tools/clippy/tests/ui/collapsible_match2.stderr b/src/tools/clippy/tests/ui/collapsible_match2.stderr
index 144dbe40a..e008355be 100644
--- a/src/tools/clippy/tests/ui/collapsible_match2.stderr
+++ b/src/tools/clippy/tests/ui/collapsible_match2.stderr
@@ -3,6 +3,7 @@ error: this `match` can be collapsed into the outer `match`
|
LL | Ok(val) if make() => match val {
| __________________________________^
+LL | |
LL | | Some(n) => foo(n),
LL | | _ => return,
LL | | },
@@ -13,30 +14,34 @@ help: the outer pattern can be modified to include the inner pattern
|
LL | Ok(val) if make() => match val {
| ^^^ replace this binding
+LL |
LL | Some(n) => foo(n),
| ^^^^^^^ with this pattern
= note: `-D clippy::collapsible-match` implied by `-D warnings`
+ = help: to override `-D warnings` add `#[allow(clippy::collapsible_match)]`
error: this `match` can be collapsed into the outer `match`
- --> $DIR/collapsible_match2.rs:20:24
+ --> $DIR/collapsible_match2.rs:21:24
|
LL | Ok(val) => match val {
| ________________________^
+LL | |
LL | | Some(n) => foo(n),
LL | | _ => return,
LL | | },
| |_____________^
|
help: the outer pattern can be modified to include the inner pattern
- --> $DIR/collapsible_match2.rs:20:16
+ --> $DIR/collapsible_match2.rs:21:16
|
LL | Ok(val) => match val {
| ^^^ replace this binding
+LL |
LL | Some(n) => foo(n),
| ^^^^^^^ with this pattern
error: this `match` can be collapsed into the outer `match`
- --> $DIR/collapsible_match2.rs:34:29
+ --> $DIR/collapsible_match2.rs:36:29
|
LL | $pat => match $e {
| _____________________________^
@@ -49,7 +54,7 @@ LL | mac!(res_opt => Ok(val), val => Some(n), foo(n));
| ------------------------------------------------ in this macro invocation
|
help: the outer pattern can be modified to include the inner pattern
- --> $DIR/collapsible_match2.rs:46:28
+ --> $DIR/collapsible_match2.rs:48:28
|
LL | mac!(res_opt => Ok(val), val => Some(n), foo(n));
| ^^^ ^^^^^^^ with this pattern
@@ -58,38 +63,42 @@ LL | mac!(res_opt => Ok(val), val => Some(n), foo(n));
= note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
error: this `match` can be collapsed into the outer `match`
- --> $DIR/collapsible_match2.rs:51:20
+ --> $DIR/collapsible_match2.rs:53:20
|
LL | Some(s) => match *s {
| ____________________^
+LL | |
LL | | [n] => foo(n),
LL | | _ => (),
LL | | },
| |_________^
|
help: the outer pattern can be modified to include the inner pattern
- --> $DIR/collapsible_match2.rs:51:14
+ --> $DIR/collapsible_match2.rs:53:14
|
LL | Some(s) => match *s {
| ^ replace this binding
+LL |
LL | [n] => foo(n),
| ^^^ with this pattern
error: this `match` can be collapsed into the outer `match`
- --> $DIR/collapsible_match2.rs:60:24
+ --> $DIR/collapsible_match2.rs:63:24
|
LL | Some(ref s) => match s {
| ________________________^
+LL | |
LL | | [n] => foo(n),
LL | | _ => (),
LL | | },
| |_________^
|
help: the outer pattern can be modified to include the inner pattern
- --> $DIR/collapsible_match2.rs:60:14
+ --> $DIR/collapsible_match2.rs:63:14
|
LL | Some(ref s) => match s {
| ^^^^^ replace this binding
+LL |
LL | [n] => foo(n),
| ^^^ with this pattern