static STATIC11: Box<MyOwned> = box MyOwned;
//~^ ERROR allocations are not allowed in statics
+//~| ERROR static contains unimplemented expression type
static mut STATIC12: UnsafeStruct = UnsafeStruct;
static STATIC15: &'static [Box<MyOwned>] = &[
box MyOwned, //~ ERROR allocations are not allowed in statics
+ //~| ERROR contains unimplemented expression
box MyOwned, //~ ERROR allocations are not allowed in statics
+ //~| ERROR contains unimplemented expression
];
static STATIC16: (&'static Box<MyOwned>, &'static Box<MyOwned>) = (
&box MyOwned, //~ ERROR allocations are not allowed in statics
+ //~| ERROR contains unimplemented expression
&box MyOwned, //~ ERROR allocations are not allowed in statics
+ //~| ERROR contains unimplemented expression
);
static mut STATIC17: SafeEnum = SafeEnum::Variant1;
static STATIC19: Box<isize> =
box 3;
//~^ ERROR allocations are not allowed in statics
+ //~| ERROR contains unimplemented expression
pub fn main() {
let y = { static x: Box<isize> = box 3; x };
//~^ ERROR allocations are not allowed in statics
- //~^^ ERROR cannot move out of static item
+ //~| ERROR cannot move out of static item
+ //~| ERROR contains unimplemented expression
}