]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/single_match_else.stderr
Rollup merge of #97236 - cjgillot:recover-lifetime-res, r=jackh726
[rust.git] / src / tools / clippy / tests / ui / single_match_else.stderr
1 error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
2   --> $DIR/single_match_else.rs:19:13
3    |
4 LL |       let _ = match ExprNode::Butterflies {
5    |  _____________^
6 LL | |         ExprNode::ExprAddrOf => Some(&NODE),
7 LL | |         _ => {
8 LL | |             let x = 5;
9 LL | |             None
10 LL | |         },
11 LL | |     };
12    | |_____^
13    |
14    = note: `-D clippy::single-match-else` implied by `-D warnings`
15 help: try this
16    |
17 LL ~     let _ = if let ExprNode::ExprAddrOf = ExprNode::Butterflies { Some(&NODE) } else {
18 LL +         let x = 5;
19 LL +         None
20 LL ~     };
21    |
22
23 error: aborting due to previous error
24