]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/collapsible_match.stderr
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / collapsible_match.stderr
CommitLineData
f20569fa
XL
1error: unnecessary nested match
2 --> $DIR/collapsible_match.rs:7:20
3 |
4LL | Ok(val) => 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
13 --> $DIR/collapsible_match.rs:7:12
14 |
15LL | Ok(val) => match val {
16 | ^^^ replace this binding
17LL | Some(n) => foo(n),
18 | ^^^^^^^ with this pattern
19
20error: unnecessary nested match
21 --> $DIR/collapsible_match.rs:16:20
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
31 --> $DIR/collapsible_match.rs:16:12
32 |
33LL | Ok(val) => match val {
34 | ^^^ replace this binding
35LL | Some(n) => foo(n),
36 | ^^^^^^^ with this pattern
37
38error: unnecessary nested match
39 --> $DIR/collapsible_match.rs:25:9
40 |
41LL | / if let Some(n) = val {
42LL | | take(n);
43LL | | }
44 | |_________^
45 |
46help: the outer pattern can be modified to include the inner pattern
47 --> $DIR/collapsible_match.rs:24:15
48 |
49LL | if let Ok(val) = res_opt {
50 | ^^^ replace this binding
51LL | if let Some(n) = val {
52 | ^^^^^^^ with this pattern
53
54error: unnecessary nested match
55 --> $DIR/collapsible_match.rs:32:9
56 |
57LL | / if let Some(n) = val {
58LL | | take(n);
59LL | | } else {
60LL | | return;
61LL | | }
62 | |_________^
63 |
64help: the outer pattern can be modified to include the inner pattern
65 --> $DIR/collapsible_match.rs:31:15
66 |
67LL | if let Ok(val) = res_opt {
68 | ^^^ replace this binding
69LL | if let Some(n) = val {
70 | ^^^^^^^ with this pattern
71
72error: unnecessary nested match
73 --> $DIR/collapsible_match.rs:43:9
74 |
75LL | / match val {
76LL | | Some(n) => foo(n),
77LL | | _ => (),
78LL | | }
79 | |_________^
80 |
81help: the outer pattern can be modified to include the inner pattern
82 --> $DIR/collapsible_match.rs:42:15
83 |
84LL | if let Ok(val) = res_opt {
85 | ^^^ replace this binding
86LL | match val {
87LL | Some(n) => foo(n),
88 | ^^^^^^^ with this pattern
89
90error: unnecessary nested match
91 --> $DIR/collapsible_match.rs:52:13
92 |
93LL | / if let Some(n) = val {
94LL | | take(n);
95LL | | }
96 | |_____________^
97 |
98help: the outer pattern can be modified to include the inner pattern
99 --> $DIR/collapsible_match.rs:51:12
100 |
101LL | Ok(val) => {
102 | ^^^ replace this binding
103LL | if let Some(n) = val {
104 | ^^^^^^^ with this pattern
105
106error: unnecessary nested match
107 --> $DIR/collapsible_match.rs:61:9
108 |
109LL | / match val {
110LL | | Some(n) => foo(n),
111LL | | _ => return,
112LL | | }
113 | |_________^
114 |
115help: the outer pattern can be modified to include the inner pattern
116 --> $DIR/collapsible_match.rs:60:15
117 |
118LL | if let Ok(val) = res_opt {
119 | ^^^ replace this binding
120LL | match val {
121LL | Some(n) => foo(n),
122 | ^^^^^^^ with this pattern
123
124error: unnecessary nested match
125 --> $DIR/collapsible_match.rs:72:13
126 |
127LL | / if let Some(n) = val {
128LL | | take(n);
129LL | | } else {
130LL | | return;
131LL | | }
132 | |_____________^
133 |
134help: the outer pattern can be modified to include the inner pattern
135 --> $DIR/collapsible_match.rs:71:12
136 |
137LL | Ok(val) => {
138 | ^^^ replace this binding
139LL | if let Some(n) = val {
140 | ^^^^^^^ with this pattern
141
142error: unnecessary nested match
143 --> $DIR/collapsible_match.rs:83:20
144 |
145LL | Ok(val) => match val {
146 | ____________________^
147LL | | Some(n) => foo(n),
148LL | | None => return,
149LL | | },
150 | |_________^
151 |
152help: the outer pattern can be modified to include the inner pattern
153 --> $DIR/collapsible_match.rs:83:12
154 |
155LL | Ok(val) => match val {
156 | ^^^ replace this binding
157LL | Some(n) => foo(n),
158 | ^^^^^^^ with this pattern
159
160error: unnecessary nested match
161 --> $DIR/collapsible_match.rs:92:22
162 |
163LL | Some(val) => match val {
164 | ______________________^
165LL | | Some(n) => foo(n),
166LL | | _ => return,
167LL | | },
168 | |_________^
169 |
170help: the outer pattern can be modified to include the inner pattern
171 --> $DIR/collapsible_match.rs:92:14
172 |
173LL | Some(val) => match val {
174 | ^^^ replace this binding
175LL | Some(n) => foo(n),
176 | ^^^^^^^ with this pattern
177
178error: aborting due to 10 previous errors
179