blob: a77f154fa7d181c4c3fdaa8735c89f1df30801d0 [file]
#![feature(const_trait_impl, const_destruct)]
struct A();
const impl Drop for A {
fn drop(&mut self) {}
}
const C: A = A();
fn main() {
let _: &'static A = &A(); //~ ERROR temporary value dropped while borrowed
let _: &'static [A] = &[C]; //~ ERROR temporary value dropped while borrowed
}