2018-12-04 00:17:53 -06:00
|
|
|
#![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),
|
2018-12-09 16:26:16 -06:00
|
|
|
_ => {
|
|
|
|
let x = 5;
|
|
|
|
None
|
|
|
|
},
|
2018-12-04 00:17:53 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|