Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit a0a1e73

Browse files
authored
Merge pull request #334 from burtonageo/71202
Add issue 71202
2 parents 5de8b76 + ce0850b commit a0a1e73

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

ices/71202.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
use std::marker::PhantomData;
2+
3+
struct DataHolder<T> {
4+
item: T,
5+
}
6+
7+
impl<T: Copy> DataHolder<T> {
8+
const ITEM_IS_COPY: [(); 1 - {
9+
trait NotCopy {
10+
const VALUE: bool = false;
11+
}
12+
13+
impl<__Type: ?Sized> NotCopy for __Type {}
14+
15+
struct IsCopy<__Type: ?Sized>(PhantomData<__Type>);
16+
17+
impl<__Type> IsCopy<__Type>
18+
where
19+
__Type: Sized + Copy,
20+
{
21+
const VALUE: bool = true;
22+
}
23+
24+
<IsCopy<T>>::VALUE
25+
} as usize] = [];
26+
}
27+
28+
fn main() {}

0 commit comments

Comments
 (0)