]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/check-static-values-constraints.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / check-static-values-constraints.rs
index eb0fc39e1bf15f49e2df910b66a78d172272cb1a..acfb3b5e44bab041a8ded3504faab37c026ccb85 100644 (file)
@@ -78,6 +78,7 @@ fn drop(&mut self) {}
 
 static STATIC11: Box<MyOwned> = box MyOwned;
 //~^ ERROR allocations are not allowed in statics
+//~| ERROR static contains unimplemented expression type
 
 static mut STATIC12: UnsafeStruct = UnsafeStruct;
 
@@ -92,12 +93,16 @@ fn drop(&mut self) {}
 
 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;
@@ -105,9 +110,11 @@ fn drop(&mut self) {}
 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
 }