mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
Add test for external macro
This commit is contained in:
parent
d36c785344
commit
e7d8cf8511
1 changed files with 12 additions and 0 deletions
|
@ -103,3 +103,15 @@ fn macro_in_closure() {
|
|||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
fn block_in_assert() {
|
||||
let opt = Some(42);
|
||||
assert!(opt
|
||||
.as_ref()
|
||||
.and_then(|val| {
|
||||
let mut v = val * 2;
|
||||
v -= 1;
|
||||
Some(v * 3)
|
||||
})
|
||||
.is_some());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue