diff options
Diffstat (limited to 'tests/ui/async-await/issue-70594.rs')
-rw-r--r-- | tests/ui/async-await/issue-70594.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/async-await/issue-70594.rs b/tests/ui/async-await/issue-70594.rs new file mode 100644 index 000000000..9e7c5847b --- /dev/null +++ b/tests/ui/async-await/issue-70594.rs @@ -0,0 +1,11 @@ +// edition:2018 + +async fn fun() { + [1; ().await]; + //~^ error: `await` is only allowed inside `async` functions and blocks + //~| error: `.await` is not allowed in a `const` + //~| error: `.await` is not allowed in a `const` + //~| error: `()` is not a future +} + +fn main() {} |