From 27d6539a46123dcdb6fae6e043b8c1c12b3e0d6f Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Fri, 8 Dec 2023 14:51:50 -0800 Subject: Plumb awaitness of for loops --- tests/ui/async-await/feature-async-for-loop.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/ui/async-await/feature-async-for-loop.rs (limited to 'tests/ui/async-await/feature-async-for-loop.rs') 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() {} -- cgit 1.4.1-3-g733a5