rust/tests/ui/async-await/async-outside-of-await-issue-121096.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
184 B
Rust
Raw Normal View History

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