blob: 1d1897e15d443edba8a4020071b0016322a4fcbc [file] [log] [blame]
#![feature(const_trait_impl, const_destruct)]
struct A();
impl const 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
}