2023-12-08 16:51:50 -06:00
|
|
|
//@ 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
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2023-12-12 19:33:51 -06:00
|
|
|
#[cfg(FALSE)]
|
|
|
|
fn g() {
|
|
|
|
let _ = async {
|
|
|
|
for await _i in core::async_iter::from_iter(0..3) {
|
|
|
|
//~^ ERROR `for await` loops are experimental
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2023-12-08 16:51:50 -06:00
|
|
|
fn main() {}
|