rust/tests/ui/consts/drop_zst.rs
2024-02-16 20:02:50 +00:00

18 lines
209 B
Rust

//@ check-fail
#![feature(const_precise_live_drops)]
struct S;
impl Drop for S {
fn drop(&mut self) {
println!("Hello!");
}
}
const fn foo() {
let s = S; //~ destructor
}
fn main() {}