1 error: this `match` can be collapsed into the outer `match`
2 --> $DIR/collapsible_match.rs:12:20
4 LL | Ok(val) => match val {
5 | ____________________^
6 LL | | Some(n) => foo(n),
11 = note: `-D clippy::collapsible-match` implied by `-D warnings`
12 help: the outer pattern can be modified to include the inner pattern
13 --> $DIR/collapsible_match.rs:12:12
15 LL | Ok(val) => match val {
16 | ^^^ replace this binding
17 LL | Some(n) => foo(n),
18 | ^^^^^^^ with this pattern
20 error: this `match` can be collapsed into the outer `match`
21 --> $DIR/collapsible_match.rs:21:20
23 LL | Ok(val) => match val {
24 | ____________________^
25 LL | | Some(n) => foo(n),
30 help: the outer pattern can be modified to include the inner pattern
31 --> $DIR/collapsible_match.rs:21:12
33 LL | Ok(val) => match val {
34 | ^^^ replace this binding
35 LL | Some(n) => foo(n),
36 | ^^^^^^^ with this pattern
38 error: this `if let` can be collapsed into the outer `if let`
39 --> $DIR/collapsible_match.rs:30:9
41 LL | / if let Some(n) = val {
46 help: the outer pattern can be modified to include the inner pattern
47 --> $DIR/collapsible_match.rs:29:15
49 LL | if let Ok(val) = res_opt {
50 | ^^^ replace this binding
51 LL | if let Some(n) = val {
52 | ^^^^^^^ with this pattern
54 error: this `if let` can be collapsed into the outer `if let`
55 --> $DIR/collapsible_match.rs:37:9
57 LL | / if let Some(n) = val {
64 help: the outer pattern can be modified to include the inner pattern
65 --> $DIR/collapsible_match.rs:36:15
67 LL | if let Ok(val) = res_opt {
68 | ^^^ replace this binding
69 LL | if let Some(n) = val {
70 | ^^^^^^^ with this pattern
72 error: this `match` can be collapsed into the outer `if let`
73 --> $DIR/collapsible_match.rs:48:9
76 LL | | Some(n) => foo(n),
81 help: the outer pattern can be modified to include the inner pattern
82 --> $DIR/collapsible_match.rs:47:15
84 LL | if let Ok(val) = res_opt {
85 | ^^^ replace this binding
87 LL | Some(n) => foo(n),
88 | ^^^^^^^ with this pattern
90 error: this `if let` can be collapsed into the outer `match`
91 --> $DIR/collapsible_match.rs:57:13
93 LL | / if let Some(n) = val {
98 help: the outer pattern can be modified to include the inner pattern
99 --> $DIR/collapsible_match.rs:56:12
102 | ^^^ replace this binding
103 LL | if let Some(n) = val {
104 | ^^^^^^^ with this pattern
106 error: this `match` can be collapsed into the outer `if let`
107 --> $DIR/collapsible_match.rs:66:9
110 LL | | Some(n) => foo(n),
115 help: the outer pattern can be modified to include the inner pattern
116 --> $DIR/collapsible_match.rs:65:15
118 LL | if let Ok(val) = res_opt {
119 | ^^^ replace this binding
121 LL | Some(n) => foo(n),
122 | ^^^^^^^ with this pattern
124 error: this `if let` can be collapsed into the outer `match`
125 --> $DIR/collapsible_match.rs:77:13
127 LL | / if let Some(n) = val {
134 help: the outer pattern can be modified to include the inner pattern
135 --> $DIR/collapsible_match.rs:76:12
138 | ^^^ replace this binding
139 LL | if let Some(n) = val {
140 | ^^^^^^^ with this pattern
142 error: this `match` can be collapsed into the outer `match`
143 --> $DIR/collapsible_match.rs:88:20
145 LL | Ok(val) => match val {
146 | ____________________^
147 LL | | Some(n) => foo(n),
148 LL | | None => return,
152 help: the outer pattern can be modified to include the inner pattern
153 --> $DIR/collapsible_match.rs:88:12
155 LL | Ok(val) => match val {
156 | ^^^ replace this binding
157 LL | Some(n) => foo(n),
158 | ^^^^^^^ with this pattern
160 error: this `match` can be collapsed into the outer `match`
161 --> $DIR/collapsible_match.rs:97:22
163 LL | Some(val) => match val {
164 | ______________________^
165 LL | | Some(n) => foo(n),
170 help: the outer pattern can be modified to include the inner pattern
171 --> $DIR/collapsible_match.rs:97:14
173 LL | Some(val) => match val {
174 | ^^^ replace this binding
175 LL | Some(n) => foo(n),
176 | ^^^^^^^ with this pattern
178 error: aborting due to 10 previous errors