1 // gate-test-const_async_blocks
4 // revisions: with_feature without_feature
6 #![feature(rustc_attrs)]
7 #![cfg_attr(with_feature, feature(const_async_blocks))]
9 use std::future::Future;
11 // From <https://github.com/rust-lang/rust/issues/77361>
12 const _: i32 = { core::mem::ManuallyDrop::new(async { 0 }); 4 };
13 //[without_feature]~^ `async` block
15 static _FUT: &(dyn Future<Output = ()> + Sync) = &async {};
16 //[without_feature]~^ `async` block
19 fn main() {} //[with_feature]~ fatal error triggered by #[rustc_error]