Skip to content

Commit e7d8cf8

Browse files
committed
Add test for external macro
1 parent d36c785 commit e7d8cf8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/ui/block_in_if_condition.rs

+12
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,15 @@ fn macro_in_closure() {
103103
unimplemented!()
104104
}
105105
}
106+
107+
fn block_in_assert() {
108+
let opt = Some(42);
109+
assert!(opt
110+
.as_ref()
111+
.and_then(|val| {
112+
let mut v = val * 2;
113+
v -= 1;
114+
Some(v * 3)
115+
})
116+
.is_some());
117+
}

0 commit comments

Comments
 (0)