From 4d8f995c3a482fecdb9a77455cd8d68d514d62ac Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Tue, 30 Dec 2014 22:36:03 +0200 Subject: rustc: merge check_static into check_const. --- src/test/compile-fail/check-static-values-constraints.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/test/compile-fail/check-static-values-constraints.rs') diff --git a/src/test/compile-fail/check-static-values-constraints.rs b/src/test/compile-fail/check-static-values-constraints.rs index 7c4f9ada2d3..0180bccbca4 100644 --- a/src/test/compile-fail/check-static-values-constraints.rs +++ b/src/test/compile-fail/check-static-values-constraints.rs @@ -99,7 +99,7 @@ static STATIC10: UnsafeStruct = UnsafeStruct; struct MyOwned; static STATIC11: Box = box MyOwned; -//~^ ERROR statics are not allowed to have custom pointers +//~^ ERROR allocations are not allowed in statics // The following examples test that mutable structs are just forbidden // to have types with destructors @@ -117,16 +117,17 @@ static mut STATIC14: SafeStruct = SafeStruct { //~^ ERROR mutable statics are not allowed to have destructors field1: SafeEnum::Variant1, field2: SafeEnum::Variant4("str".to_string()) +//~^ ERROR static contains unimplemented expression type }; static STATIC15: &'static [Box] = &[ - box MyOwned, //~ ERROR statics are not allowed to have custom pointers - box MyOwned, //~ ERROR statics are not allowed to have custom pointers + box MyOwned, //~ ERROR allocations are not allowed in statics + box MyOwned, //~ ERROR allocations are not allowed in statics ]; static STATIC16: (&'static Box, &'static Box) = ( - &box MyOwned, //~ ERROR statics are not allowed to have custom pointers - &box MyOwned, //~ ERROR statics are not allowed to have custom pointers + &box MyOwned, //~ ERROR allocations are not allowed in statics + &box MyOwned, //~ ERROR allocations are not allowed in statics ); static mut STATIC17: SafeEnum = SafeEnum::Variant1; @@ -134,9 +135,9 @@ static mut STATIC17: SafeEnum = SafeEnum::Variant1; static STATIC19: Box = box 3; -//~^ ERROR statics are not allowed to have custom pointers +//~^ ERROR allocations are not allowed in statics pub fn main() { let y = { static x: Box = box 3; x }; - //~^ ERROR statics are not allowed to have custom pointers + //~^ ERROR allocations are not allowed in statics } -- cgit 1.4.1-3-g733a5