]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/collapsible_match2.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / collapsible_match2.stderr
CommitLineData
94222f64 1error: this `match` can be collapsed into the outer `match`
cdc7bbd5 2 --> $DIR/collapsible_match2.rs:13:34
f20569fa
XL
3 |
4LL | Ok(val) if make() => match val {
5 | __________________________________^
6LL | | Some(n) => foo(n),
7LL | | _ => return,
8LL | | },
9 | |_____________^
10 |
11 = note: `-D clippy::collapsible-match` implied by `-D warnings`
12help: the outer pattern can be modified to include the inner pattern
cdc7bbd5 13 --> $DIR/collapsible_match2.rs:13:16
f20569fa
XL
14 |
15LL | Ok(val) if make() => match val {
16 | ^^^ replace this binding
17LL | Some(n) => foo(n),
18 | ^^^^^^^ with this pattern
19
94222f64 20error: this `match` can be collapsed into the outer `match`
cdc7bbd5 21 --> $DIR/collapsible_match2.rs:20:24
f20569fa
XL
22 |
23LL | Ok(val) => match val {
24 | ________________________^
25LL | | Some(n) => foo(n),
26LL | | _ => return,
27LL | | },
28 | |_____________^
29 |
30help: the outer pattern can be modified to include the inner pattern
cdc7bbd5 31 --> $DIR/collapsible_match2.rs:20:16
f20569fa
XL
32 |
33LL | Ok(val) => match val {
34 | ^^^ replace this binding
35LL | Some(n) => foo(n),
36 | ^^^^^^^ with this pattern
37
94222f64 38error: this `match` can be collapsed into the outer `match`
cdc7bbd5 39 --> $DIR/collapsible_match2.rs:34:29
f20569fa
XL
40 |
41LL | $pat => match $e {
42 | _____________________________^
43LL | | $inner_pat => $then,
44LL | | _ => return,
45LL | | },
46 | |_____________________^
47...
48LL | mac!(res_opt => Ok(val), val => Some(n), foo(n));
49 | ------------------------------------------------- in this macro invocation
50 |
51help: the outer pattern can be modified to include the inner pattern
cdc7bbd5 52 --> $DIR/collapsible_match2.rs:46:28
f20569fa
XL
53 |
54LL | mac!(res_opt => Ok(val), val => Some(n), foo(n));
55 | ^^^ ^^^^^^^ with this pattern
56 | |
57 | replace this binding
17df50a5 58 = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
f20569fa 59
94222f64 60error: this `match` can be collapsed into the outer `match`
cdc7bbd5 61 --> $DIR/collapsible_match2.rs:51:20
f20569fa
XL
62 |
63LL | Some(s) => match *s {
64 | ____________________^
65LL | | [n] => foo(n),
66LL | | _ => (),
67LL | | },
68 | |_________^
69 |
70help: the outer pattern can be modified to include the inner pattern
cdc7bbd5 71 --> $DIR/collapsible_match2.rs:51:14
f20569fa
XL
72 |
73LL | Some(s) => match *s {
74 | ^ replace this binding
75LL | [n] => foo(n),
76 | ^^^ with this pattern
77
94222f64 78error: this `match` can be collapsed into the outer `match`
cdc7bbd5 79 --> $DIR/collapsible_match2.rs:60:24
f20569fa
XL
80 |
81LL | Some(ref s) => match &*s {
82 | ________________________^
83LL | | [n] => foo(n),
84LL | | _ => (),
85LL | | },
86 | |_________^
87 |
88help: the outer pattern can be modified to include the inner pattern
cdc7bbd5 89 --> $DIR/collapsible_match2.rs:60:14
f20569fa
XL
90 |
91LL | Some(ref s) => match &*s {
92 | ^^^^^ replace this binding
93LL | [n] => foo(n),
94 | ^^^ with this pattern
95
96error: aborting due to 5 previous errors
97