Add test for external macro

This commit is contained in:
flip1995 2019-08-27 09:43:19 +02:00
parent d36c785344
commit e7d8cf8511
No known key found for this signature in database
GPG key ID: 693086869D506637

View file

@ -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());
}