summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/drop_zst.rs
blob: f7c70d3978b7f24922e45e7ef2f0bee815bafcce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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() {}