rust/tests/ui/async-await/async-outside-of-await-issue-121096.rs
2024-02-27 03:20:10 +00:00

10 lines
184 B
Rust

//@ edition:2021
fn main() {
async {
use std::ops::Add;
let _ = 1.add(3);
}.await
//~^ ERROR `await` is only allowed inside `async` functions and blocks
}