about summary refs log tree commit diff
path: root/tests/ui/consts/drop_zst.rs
blob: daf8f1b0343d177df511e51f8eeba5aa665b8f7c (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; //~ ERROR destructor
}

fn main() {}