]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/async-block.rs
New upstream version 1.54.0+dfsg1
[rustc.git] / src / test / ui / consts / async-block.rs
CommitLineData
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
9use std::future::Future;
1b1a35ee 10
17df50a5 11// From <https://github.com/rust-lang/rust/issues/77361>
1b1a35ee 12const _: i32 = { core::mem::ManuallyDrop::new(async { 0 }); 4 };
17df50a5
XL
13//[without_feature]~^ `async` block
14
15static _FUT: &(dyn Future<Output = ()> + Sync) = &async {};
16//[without_feature]~^ `async` block
1b1a35ee 17
17df50a5
XL
18#[rustc_error]
19fn main() {} //[with_feature]~ fatal error triggered by #[rustc_error]