]> git.lizzy.rs Git - rust.git/blob - src/test/incremental/const-generics/issue-68477.rs
Rollup merge of #99576 - compiler-errors:foreign-fundamental-drop-is-bad, r=TaKO8Ki
[rust.git] / src / test / incremental / const-generics / issue-68477.rs
1 // edition:2018
2 // revisions:rpass1
3
4 // Needed to supply generic arguments to the anon const in `[(); FOO]`.
5 #![feature(generic_const_exprs)]
6
7 const FOO: usize = 1;
8
9 struct Container<T> {
10     val: std::marker::PhantomData<T>,
11     blah: [(); FOO]
12 }
13
14 async fn dummy() {}
15
16 async fn foo() {
17     let a: Container<&'static ()>;
18     dummy().await;
19 }
20
21 fn is_send<T: Send>(_: T) {}
22
23 fn main() {
24     is_send(foo());
25 }