Regression test for case in #77361

This commit is contained in:
Dylan MacKenzie 2020-10-01 10:07:15 -07:00
parent 50e0c0d97b
commit b48def819e
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,8 @@
// From <https://github.com/rust-lang/rust/issues/77361>
// edition:2018
const _: i32 = { core::mem::ManuallyDrop::new(async { 0 }); 4 };
//~^ `async` block
fn main() {}

View File

@ -0,0 +1,8 @@
error: `async` blocks are not allowed in constants
--> $DIR/async-block.rs:5:47
|
LL | const _: i32 = { core::mem::ManuallyDrop::new(async { 0 }); 4 };
| ^^^^^^^^^^^
error: aborting due to previous error