@@ -37,7 +37,7 @@ static STATIC2: SafeEnum = SafeEnum::Variant2(0);
37
37
38
38
// This one should fail
39
39
static STATIC3 : SafeEnum = SafeEnum :: Variant3 ( WithDtor ) ;
40
- //~^ ERROR statics are not allowed to have destructors
40
+ //~^ ERROR destructors in statics are an unstable feature
41
41
42
42
43
43
// This enum will be used to test that variants
@@ -54,9 +54,9 @@ impl Drop for UnsafeEnum {
54
54
55
55
56
56
static STATIC4 : UnsafeEnum = UnsafeEnum :: Variant5 ;
57
- //~^ ERROR statics are not allowed to have destructors
57
+ //~^ ERROR destructors in statics are an unstable feature
58
58
static STATIC5 : UnsafeEnum = UnsafeEnum :: Variant6 ( 0 ) ;
59
- //~^ ERROR statics are not allowed to have destructors
59
+ //~^ ERROR destructors in statics are an unstable feature
60
60
61
61
62
62
struct SafeStruct {
@@ -71,7 +71,7 @@ static STATIC6: SafeStruct = SafeStruct{field1: SafeEnum::Variant1, field2: Safe
71
71
// field2 has an unsafe value, hence this should fail
72
72
static STATIC7 : SafeStruct = SafeStruct { field1 : SafeEnum :: Variant1 ,
73
73
field2 : SafeEnum :: Variant3 ( WithDtor ) } ;
74
- //~^ ERROR statics are not allowed to have destructors
74
+ //~^ ERROR destructors in statics are an unstable feature
75
75
76
76
// Test variadic constructor for structs. The base struct should be examined
77
77
// as well as every field present in the constructor.
@@ -84,7 +84,7 @@ static STATIC8: SafeStruct = SafeStruct{field1: SafeEnum::Variant1,
84
84
static STATIC9 : SafeStruct = SafeStruct { field1 : SafeEnum :: Variant1 ,
85
85
..SafeStruct { field1 : SafeEnum :: Variant3 ( WithDtor ) ,
86
86
field2 : SafeEnum :: Variant1 } } ;
87
- //~^^ ERROR statics are not allowed to have destructors
87
+ //~^^ ERROR destructors in statics are an unstable feature
88
88
89
89
struct UnsafeStruct ;
90
90
@@ -94,7 +94,7 @@ impl Drop for UnsafeStruct {
94
94
95
95
// Types with destructors are not allowed for statics
96
96
static STATIC10 : UnsafeStruct = UnsafeStruct ;
97
- //~^ ERROR statics are not allowed to have destructor
97
+ //~^ ERROR destructors in statics are an unstable feature
98
98
99
99
struct MyOwned ;
100
100
@@ -105,19 +105,19 @@ static STATIC11: Box<MyOwned> = box MyOwned;
105
105
// to have types with destructors
106
106
// These should fail
107
107
static 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
110
110
111
111
static 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
113
113
field2 : SafeEnum :: Variant3 ( WithDtor ) } ;
114
- //~^ ERROR: statics are not allowed to have destructors
114
+ //~^ ERROR: destructors in statics are an unstable feature
115
115
116
116
static mut STATIC14 : SafeStruct = SafeStruct {
117
- //~^ ERROR mutable statics are not allowed to have destructors
117
+ //~^ ERROR destructors in statics are an unstable feature
118
118
field1 : SafeEnum :: Variant1 ,
119
119
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
121
121
} ;
122
122
123
123
static STATIC15 : & ' static [ Box < MyOwned > ] = & [
@@ -131,7 +131,7 @@ static STATIC16: (&'static Box<MyOwned>, &'static Box<MyOwned>) = (
131
131
) ;
132
132
133
133
static mut STATIC17 : SafeEnum = SafeEnum :: Variant1 ;
134
- //~^ ERROR mutable statics are not allowed to have destructors
134
+ //~^ ERROR destructors in statics are an unstable feature
135
135
136
136
static STATIC19 : Box < isize > =
137
137
box 3 ;
0 commit comments