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

Commit 4eab5c1

Browse files
committed
Failing test
1 parent a13b13f commit 4eab5c1

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#![feature(const_trait_impl)]
2+
#![feature(const_mut_refs)]
3+
#![feature(const_fn_trait_bound)]
4+
5+
struct NonTrivialDrop;
6+
7+
impl Drop for NonTrivialDrop {
8+
fn drop(&mut self) {
9+
println!("Non trivial drop");
10+
}
11+
}
12+
13+
struct ConstImplWithDropGlue(NonTrivialDrop);
14+
15+
impl const Drop for ConstImplWithDropGlue {
16+
fn drop(&mut self) {}
17+
}
18+
19+
const fn check<T: ~const Drop>() {}
20+
21+
macro_rules! check_all {
22+
($($T:ty),*$(,)?) => {$(
23+
const _: () = check::<$T>();
24+
)*};
25+
}
26+
27+
check_all! {
28+
ConstImplWithDropGlue,
29+
}
30+
31+
fn main() {}

0 commit comments

Comments
 (0)