rust/tests/ui/consts/drop_zst.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
209 B
Rust
Raw Normal View History

2021-12-01 18:04:21 +00:00
//@ 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() {}