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