2021-12-01 10:04:21 -08:00
|
|
|
//@ check-fail
|
|
|
|
|
|
|
|
|
|
#![feature(const_precise_live_drops)]
|
|
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
|
|
impl Drop for S {
|
|
|
|
|
fn drop(&mut self) {
|
|
|
|
|
println!("Hello!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const fn foo() {
|
2025-04-05 19:19:56 +03:00
|
|
|
let s = S; //~ ERROR destructor
|
2021-12-01 10:04:21 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|