diff options
| author | Eric Holk <ericholk@microsoft.com> | 2023-12-08 14:51:50 -0800 |
|---|---|---|
| committer | Eric Holk <ericholk@microsoft.com> | 2023-12-19 12:26:20 -0800 |
| commit | 27d6539a46123dcdb6fae6e043b8c1c12b3e0d6f (patch) | |
| tree | b57c35ff3b5d0f5ddd5ff8060acdcf1d8f0f2ace /tests/ui/async-await/feature-async-for-loop.rs | |
| parent | bf9229a2e366b4c311f059014a4aa08af16de5d8 (diff) | |
| download | rust-27d6539a46123dcdb6fae6e043b8c1c12b3e0d6f.tar.gz rust-27d6539a46123dcdb6fae6e043b8c1c12b3e0d6f.zip | |
Plumb awaitness of for loops
Diffstat (limited to 'tests/ui/async-await/feature-async-for-loop.rs')
| -rw-r--r-- | tests/ui/async-await/feature-async-for-loop.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/async-await/feature-async-for-loop.rs b/tests/ui/async-await/feature-async-for-loop.rs new file mode 100644 index 00000000000..6d32b3ca700 --- /dev/null +++ b/tests/ui/async-await/feature-async-for-loop.rs @@ -0,0 +1,14 @@ +// edition:2021 +// gate-test-async_for_loop + +#![feature(async_iter_from_iter, async_iterator)] + +fn f() { + let _ = async { + for await _i in core::async_iter::from_iter(0..3) { + //~^ ERROR `for await` loops are experimental + } + }; +} + +fn main() {} |
