2
0
Fork 0
mirror of https://github.com/rust-lang/rust-clippy synced 2024-12-22 11:03:16 +00:00
rust-clippy/tests/ui/single_match_else.rs
2019-01-08 21:46:39 +01:00

21 lines
363 B
Rust

#![warn(clippy::single_match_else)]
enum ExprNode {
ExprAddrOf,
Butterflies,
Unicorns,
}
static NODE: ExprNode = ExprNode::Unicorns;
fn unwrap_addr() -> Option<&'static ExprNode> {
match ExprNode::Butterflies {
ExprNode::ExprAddrOf => Some(&NODE),
_ => {
let x = 5;
None
},
}
}
fn main() {}