diff options
Diffstat (limited to 'tests/ui/async-await/async-closures/mac-body.rs')
| -rw-r--r-- | tests/ui/async-await/async-closures/mac-body.rs | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/tests/ui/async-await/async-closures/mac-body.rs b/tests/ui/async-await/async-closures/mac-body.rs new file mode 100644 index 00000000000..a416227c390 --- /dev/null +++ b/tests/ui/async-await/async-closures/mac-body.rs @@ -0,0 +1,12 @@ +//@ edition: 2021 +//@ check-pass + +#![feature(async_closure)] + +// Make sure we don't ICE if an async closure has a macro body. +// This happened because we were calling walk instead of visit +// in the def collector, oops! + +fn main() { + let _ = async || println!(); +} | 
