diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/async-await/issue-70594.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/async-await/issue-70594.rs b/src/test/ui/async-await/issue-70594.rs new file mode 100644 index 000000000..9e7c5847b --- /dev/null +++ b/src/test/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() {} |