diff options
Diffstat (limited to 'tests/ui/async-await/async-closures/ambiguous-arg.rs')
| -rw-r--r-- | tests/ui/async-await/async-closures/ambiguous-arg.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/async-await/async-closures/ambiguous-arg.rs b/tests/ui/async-await/async-closures/ambiguous-arg.rs new file mode 100644 index 00000000000..d76a1cf953e --- /dev/null +++ b/tests/ui/async-await/async-closures/ambiguous-arg.rs @@ -0,0 +1,15 @@ +//@ edition:2021 + +// Regression test for #123901. We previously ICE'd as we silently +// swallowed an in the `ExprUseVisitor`. + +#![feature(async_closure)] + +pub fn test(test: &u64, temp: &u64) { + async |check, a, b| { + //~^ ERROR type annotations needed + temp.abs_diff(12); + }; +} + +fn main() {} |
