Skip to content

Commit

Permalink
Add test for external macro
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Aug 27, 2019
1 parent d36c785 commit e7d8cf8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/ui/block_in_if_condition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

0 comments on commit e7d8cf8

Please sign in to comment.