mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
17 lines
209 B
Rust
17 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() {}
|