Why &Type without drop will be allocated at heap, but having a drop will allocated at stack?
fn mainx() {
struct Bar {
i: i32,
n: i64,
}
impl Drop for Bar {
fn drop(&mut self) {}
}
// ERROR
let cc2: &'static Bar = &Bar { i: 2, n: 0 };
struct Foo {
i: i32,
n: i64,
}
// OK
let cc2: &'static Foo = &Foo { i: 2, n: 0 };
}