// known-bug: #110395 #![feature(const_trait_impl)] #![feature(const_mut_refs)] #![cfg_attr(precise, feature(const_precise_live_drops))] use std::marker::{Destruct, PhantomData}; struct NonTrivialDrop; impl Drop for NonTrivialDrop { fn drop(&mut self) { println!("Non trivial drop"); } } #[const_trait] trait A { fn a() { } } impl A for NonTrivialDrop {} struct ConstDropImplWithBounds(PhantomData); impl const Drop for ConstDropImplWithBounds { fn drop(&mut self) { T::a(); } } const fn check(_: T) {} const _: () = check::>( ConstDropImplWithBounds(PhantomData) ); struct ConstDropImplWithNonConstBounds(PhantomData); impl const Drop for ConstDropImplWithNonConstBounds { fn drop(&mut self) { T::a(); } } fn main() {}