diff options
| author | flip1995 <hello@philkrones.com> | 2019-08-27 09:43:19 +0200 |
|---|---|---|
| committer | flip1995 <hello@philkrones.com> | 2019-08-27 09:43:19 +0200 |
| commit | e7d8cf85117c680f3e6dccc87b210a85512b9850 (patch) | |
| tree | ad31d677d4731927e9b00945684c22b906629762 | |
| parent | d36c785344bdbfffa3c0424c0459abe921c63270 (diff) | |
| download | rust-e7d8cf85117c680f3e6dccc87b210a85512b9850.tar.gz rust-e7d8cf85117c680f3e6dccc87b210a85512b9850.zip | |
Add test for external macro
| -rw-r--r-- | tests/ui/block_in_if_condition.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/block_in_if_condition.rs b/tests/ui/block_in_if_condition.rs index 10342ed28b5..50f238814a3 100644 --- a/tests/ui/block_in_if_condition.rs +++ b/tests/ui/block_in_if_condition.rs @@ -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()); +} |
