about summary refs log tree commit diff
path: root/src/test/compile-fail/check-static-values-constraints.rs
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2016-05-05 08:11:28 +0300
committerEduard Burtescu <edy.burt@gmail.com>2016-05-07 19:14:33 +0300
commited66fe48e94df2cd0dee5af4afa44d7fb50cb0cf (patch)
tree0a875e37191033361b5c3a04aa8494551157922a /src/test/compile-fail/check-static-values-constraints.rs
parent4f5900aefac42cec488a68c041ecd538c04b84fd (diff)
downloadrust-ed66fe48e94df2cd0dee5af4afa44d7fb50cb0cf.tar.gz
rust-ed66fe48e94df2cd0dee5af4afa44d7fb50cb0cf.zip
Implement RFC 1440 "Allow Drop types in statics/const functions".
Diffstat (limited to 'src/test/compile-fail/check-static-values-constraints.rs')
-rw-r--r--src/test/compile-fail/check-static-values-constraints.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/test/compile-fail/check-static-values-constraints.rs b/src/test/compile-fail/check-static-values-constraints.rs
index ded0d07d737..df22e2ea4de 100644
--- a/src/test/compile-fail/check-static-values-constraints.rs
+++ b/src/test/compile-fail/check-static-values-constraints.rs
@@ -37,7 +37,7 @@ static STATIC2: SafeEnum = SafeEnum::Variant2(0);
 
 // This one should fail
 static STATIC3: SafeEnum = SafeEnum::Variant3(WithDtor);
-//~^ ERROR statics are not allowed to have destructors
+//~^ ERROR destructors in statics are an unstable feature
 
 
 // This enum will be used to test that variants
@@ -54,9 +54,9 @@ impl Drop for UnsafeEnum {
 
 
 static STATIC4: UnsafeEnum = UnsafeEnum::Variant5;
-//~^ ERROR statics are not allowed to have destructors
+//~^ ERROR destructors in statics are an unstable feature
 static STATIC5: UnsafeEnum = UnsafeEnum::Variant6(0);
-//~^ ERROR statics are not allowed to have destructors
+//~^ ERROR destructors in statics are an unstable feature
 
 
 struct SafeStruct {
@@ -71,7 +71,7 @@ static STATIC6: SafeStruct = SafeStruct{field1: SafeEnum::Variant1, field2: Safe
 // field2 has an unsafe value, hence this should fail
 static STATIC7: SafeStruct = SafeStruct{field1: SafeEnum::Variant1,
                                         field2: SafeEnum::Variant3(WithDtor)};
-//~^ ERROR statics are not allowed to have destructors
+//~^ ERROR destructors in statics are an unstable feature
 
 // Test variadic constructor for structs. The base struct should be examined
 // as well as every field present in the constructor.
@@ -84,7 +84,7 @@ static STATIC8: SafeStruct = SafeStruct{field1: SafeEnum::Variant1,
 static STATIC9: SafeStruct = SafeStruct{field1: SafeEnum::Variant1,
                                         ..SafeStruct{field1: SafeEnum::Variant3(WithDtor),
                                                      field2: SafeEnum::Variant1}};
-//~^^ ERROR statics are not allowed to have destructors
+//~^^ ERROR destructors in statics are an unstable feature
 
 struct UnsafeStruct;
 
@@ -94,7 +94,7 @@ impl Drop for UnsafeStruct {
 
 // Types with destructors are not allowed for statics
 static STATIC10: UnsafeStruct = UnsafeStruct;
-//~^ ERROR statics are not allowed to have destructor
+//~^ ERROR destructors in statics are an unstable feature
 
 struct MyOwned;
 
@@ -105,19 +105,19 @@ static STATIC11: Box<MyOwned> = box MyOwned;
 // to have types with destructors
 // These should fail
 static mut STATIC12: UnsafeStruct = UnsafeStruct;
-//~^ ERROR mutable statics are not allowed to have destructors
-//~^^ ERROR statics are not allowed to have destructors
+//~^ ERROR destructors in statics are an unstable feature
+//~^^ ERROR destructors in statics are an unstable feature
 
 static mut STATIC13: SafeStruct = SafeStruct{field1: SafeEnum::Variant1,
-//~^ ERROR mutable statics are not allowed to have destructors
+//~^ ERROR destructors in statics are an unstable feature
                                              field2: SafeEnum::Variant3(WithDtor)};
-//~^ ERROR: statics are not allowed to have destructors
+//~^ ERROR: destructors in statics are an unstable feature
 
 static mut STATIC14: SafeStruct = SafeStruct {
-//~^ ERROR mutable statics are not allowed to have destructors
+//~^ ERROR destructors in statics are an unstable feature
     field1: SafeEnum::Variant1,
     field2: SafeEnum::Variant4("str".to_string())
-//~^ ERROR method calls in statics are limited to constant inherent methods
+//~^ ERROR calls in statics are limited to constant functions
 };
 
 static STATIC15: &'static [Box<MyOwned>] = &[
@@ -131,7 +131,7 @@ static STATIC16: (&'static Box<MyOwned>, &'static Box<MyOwned>) = (
 );
 
 static mut STATIC17: SafeEnum = SafeEnum::Variant1;
-//~^ ERROR mutable statics are not allowed to have destructors
+//~^ ERROR destructors in statics are an unstable feature
 
 static STATIC19: Box<isize> =
     box 3;