1
Fork 0

Failing test

This commit is contained in:
Deadbeef 2021-09-01 16:40:42 +00:00
parent a13b13ff46
commit 4eab5c1f7b
No known key found for this signature in database
GPG key ID: 027DF9338862ADDD

View file

@ -0,0 +1,31 @@
#![feature(const_trait_impl)]
#![feature(const_mut_refs)]
#![feature(const_fn_trait_bound)]
struct NonTrivialDrop;
impl Drop for NonTrivialDrop {
fn drop(&mut self) {
println!("Non trivial drop");
}
}
struct ConstImplWithDropGlue(NonTrivialDrop);
impl const Drop for ConstImplWithDropGlue {
fn drop(&mut self) {}
}
const fn check<T: ~const Drop>() {}
macro_rules! check_all {
($($T:ty),*$(,)?) => {$(
const _: () = check::<$T>();
)*};
}
check_all! {
ConstImplWithDropGlue,
}
fn main() {}