]> git.lizzy.rs Git - rust.git/blob - tests/ui/single_match_else.rs
Auto merge of #4809 - iankronquist:patch-1, r=flip1995
[rust.git] / tests / ui / single_match_else.rs
1 #![warn(clippy::single_match_else)]
2
3 enum ExprNode {
4     ExprAddrOf,
5     Butterflies,
6     Unicorns,
7 }
8
9 static NODE: ExprNode = ExprNode::Unicorns;
10
11 fn unwrap_addr() -> Option<&'static ExprNode> {
12     match ExprNode::Butterflies {
13         ExprNode::ExprAddrOf => Some(&NODE),
14         _ => {
15             let x = 5;
16             None
17         },
18     }
19 }
20
21 fn main() {}