Skip to content

Commit 9cae051

Browse files
committed
add test
1 parent 9bb6fbe commit 9cae051

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/ui/parser/bad-await-body.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
await{}()
3+
//~^ ERROR: cannot find struct, variant or union type `await` in this scope
4+
}

tests/ui/parser/bad-await-body.stderr

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0422]: cannot find struct, variant or union type `await` in this scope
2+
--> $DIR/bad-await-body.rs:2:5
3+
|
4+
LL | await{}()
5+
| ^^^^^ not found in this scope
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0422`.

0 commit comments

Comments
 (0)