@@ -37,7 +37,7 @@ static STATIC2: SafeEnum = SafeEnum::Variant2(0);
3737
3838// This one should fail
3939static STATIC3 : SafeEnum = SafeEnum :: Variant3 ( WithDtor ) ;
40- //~^ ERROR statics are not allowed to have destructors
40+ //~^ ERROR destructors in statics are an unstable feature
4141
4242
4343// This enum will be used to test that variants
@@ -54,9 +54,9 @@ impl Drop for UnsafeEnum {
5454
5555
5656static STATIC4 : UnsafeEnum = UnsafeEnum :: Variant5 ;
57- //~^ ERROR statics are not allowed to have destructors
57+ //~^ ERROR destructors in statics are an unstable feature
5858static STATIC5 : UnsafeEnum = UnsafeEnum :: Variant6 ( 0 ) ;
59- //~^ ERROR statics are not allowed to have destructors
59+ //~^ ERROR destructors in statics are an unstable feature
6060
6161
6262struct SafeStruct {
@@ -71,7 +71,7 @@ static STATIC6: SafeStruct = SafeStruct{field1: SafeEnum::Variant1, field2: Safe
7171// field2 has an unsafe value, hence this should fail
7272static STATIC7 : SafeStruct = SafeStruct { field1 : SafeEnum :: Variant1 ,
7373 field2 : SafeEnum :: Variant3 ( WithDtor ) } ;
74- //~^ ERROR statics are not allowed to have destructors
74+ //~^ ERROR destructors in statics are an unstable feature
7575
7676// Test variadic constructor for structs. The base struct should be examined
7777// as well as every field present in the constructor.
@@ -84,7 +84,7 @@ static STATIC8: SafeStruct = SafeStruct{field1: SafeEnum::Variant1,
8484static STATIC9 : SafeStruct = SafeStruct { field1 : SafeEnum :: Variant1 ,
8585 ..SafeStruct { field1 : SafeEnum :: Variant3 ( WithDtor ) ,
8686 field2 : SafeEnum :: Variant1 } } ;
87- //~^^ ERROR statics are not allowed to have destructors
87+ //~^^ ERROR destructors in statics are an unstable feature
8888
8989struct UnsafeStruct ;
9090
@@ -94,7 +94,7 @@ impl Drop for UnsafeStruct {
9494
9595// Types with destructors are not allowed for statics
9696static STATIC10 : UnsafeStruct = UnsafeStruct ;
97- //~^ ERROR statics are not allowed to have destructor
97+ //~^ ERROR destructors in statics are an unstable feature
9898
9999struct MyOwned ;
100100
@@ -105,19 +105,19 @@ static STATIC11: Box<MyOwned> = box MyOwned;
105105// to have types with destructors
106106// These should fail
107107static mut STATIC12 : UnsafeStruct = UnsafeStruct ;
108- //~^ ERROR mutable statics are not allowed to have destructors
109- //~^^ ERROR statics are not allowed to have destructors
108+ //~^ ERROR destructors in statics are an unstable feature
109+ //~^^ ERROR destructors in statics are an unstable feature
110110
111111static mut STATIC13 : SafeStruct = SafeStruct { field1 : SafeEnum :: Variant1 ,
112- //~^ ERROR mutable statics are not allowed to have destructors
112+ //~^ ERROR destructors in statics are an unstable feature
113113 field2 : SafeEnum :: Variant3 ( WithDtor ) } ;
114- //~^ ERROR: statics are not allowed to have destructors
114+ //~^ ERROR: destructors in statics are an unstable feature
115115
116116static mut STATIC14 : SafeStruct = SafeStruct {
117- //~^ ERROR mutable statics are not allowed to have destructors
117+ //~^ ERROR destructors in statics are an unstable feature
118118 field1 : SafeEnum :: Variant1 ,
119119 field2 : SafeEnum :: Variant4 ( "str" . to_string ( ) )
120- //~^ ERROR method calls in statics are limited to constant inherent methods
120+ //~^ ERROR calls in statics are limited to constant functions
121121} ;
122122
123123static STATIC15 : & ' static [ Box < MyOwned > ] = & [
@@ -131,7 +131,7 @@ static STATIC16: (&'static Box<MyOwned>, &'static Box<MyOwned>) = (
131131) ;
132132
133133static mut STATIC17 : SafeEnum = SafeEnum :: Variant1 ;
134- //~^ ERROR mutable statics are not allowed to have destructors
134+ //~^ ERROR destructors in statics are an unstable feature
135135
136136static STATIC19 : Box < isize > =
137137 box 3 ;
0 commit comments