We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13fd466 commit 25d507fCopy full SHA for 25d507f
src/test/ui/issues/issue-63398.rs renamed to src/test/ui/async-await/issues/non-async-enclosing-span.rs
@@ -4,8 +4,9 @@
4
async fn do_the_thing() -> u8 {
5
8
6
}
7
-
-fn main() {
+// #63398: point at the enclosing scope and not the previously seen closure
+fn main() { //~ NOTE this is not `async`
9
let x = move || {};
10
let y = do_the_thing().await; //~ ERROR `await` is only allowed inside `async` functions
11
+ //~^ NOTE only allowed inside `async` functions and blocks
12
src/test/ui/issues/issue-63398.stderr renamed to src/test/ui/async-await/issues/non-async-enclosing-span.stderr
@@ -1,5 +1,5 @@
1
error[E0728]: `await` is only allowed inside `async` functions and blocks
2
- --> $DIR/issue-63398.rs:10:13
+ --> $DIR/non-async-enclosing-span.rs:10:13
3
|
LL | fn main() {
| ---- this is not `async`
0 commit comments