]> git.lizzy.rs Git - rust.git/blob - tests/ui/single_match_else.stderr
Extract single_match_else UI test
[rust.git] / 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:21:5
3    |
4 21 | /     match ExprNode::Butterflies {
5 22 | |         ExprNode::ExprAddrOf => Some(&NODE),
6 23 | |         _ => { let x = 5; None },
7 24 | |     }
8    | |_____^ help: try this: `if let ExprNode::ExprAddrOf = ExprNode::Butterflies { Some(&NODE) } else { let x = 5; None }`
9    |
10    = note: `-D clippy::single-match-else` implied by `-D warnings`
11
12 error: aborting due to previous error
13