2025-04-29 10:15:19 +00:00
|
|
|
//@[new] compile-flags: -Znext-solver
|
|
|
|
|
//@ revisions: old new
|
2025-04-29 10:20:16 +00:00
|
|
|
//@ check-pass
|
2025-04-29 10:15:19 +00:00
|
|
|
|
|
|
|
|
#![feature(const_destruct)]
|
|
|
|
|
#![feature(const_trait_impl)]
|
|
|
|
|
|
|
|
|
|
use std::mem::ManuallyDrop;
|
|
|
|
|
|
|
|
|
|
struct Moose;
|
|
|
|
|
|
|
|
|
|
impl Drop for Moose {
|
|
|
|
|
fn drop(&mut self) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct ConstDropper<T>(ManuallyDrop<T>);
|
|
|
|
|
|
|
|
|
|
impl<T> const Drop for ConstDropper<T> {
|
|
|
|
|
fn drop(&mut self) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const fn foo(_var: ConstDropper<Moose>) {}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|