mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
Added test for single_match_else in macro
This commit is contained in:
parent
ba6a3280f5
commit
793403a2a8
1 changed files with 15 additions and 1 deletions
|
@ -18,4 +18,18 @@ fn unwrap_addr() -> Option<&'static ExprNode> {
|
|||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
macro_rules! unwrap_addr {
|
||||
($expression:expr) => {
|
||||
match $expression {
|
||||
ExprNode::ExprAddrOf => Some(&NODE),
|
||||
_ => {
|
||||
let x = 5;
|
||||
None
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
unwrap_addr!(ExprNode::Unicorns);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue