We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 50e0c0d commit b48def8Copy full SHA for b48def8
src/test/ui/consts/async-block.rs
@@ -0,0 +1,8 @@
1
+// From <https://github.com/rust-lang/rust/issues/77361>
2
+
3
+// edition:2018
4
5
+const _: i32 = { core::mem::ManuallyDrop::new(async { 0 }); 4 };
6
+//~^ `async` block
7
8
+fn main() {}
src/test/ui/consts/async-block.stderr
+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
0 commit comments