@@ -79,7 +79,7 @@ static STATIC10: UnsafeStruct = UnsafeStruct;
79
79
struct MyOwned ;
80
80
81
81
static STATIC11 : Vec < MyOwned > = vec ! [ MyOwned ] ;
82
- //~^ ERROR allocations are not allowed in statics
82
+ //~^ ERROR cannot call non-const
83
83
//~^^ ERROR cannot call non-const
84
84
85
85
static mut STATIC12 : UnsafeStruct = UnsafeStruct ;
@@ -93,28 +93,28 @@ static mut STATIC14: SafeStruct = SafeStruct {
93
93
} ;
94
94
95
95
static STATIC15 : & ' static [ Vec < MyOwned > ] = & [
96
- vec ! [ MyOwned ] , //~ ERROR allocations are not allowed in statics
96
+ vec ! [ MyOwned ] , //~ ERROR cannot call non-const
97
97
//~^ ERROR cannot call non-const
98
- vec ! [ MyOwned ] , //~ ERROR allocations are not allowed in statics
98
+ vec ! [ MyOwned ] , //~ ERROR cannot call non-const
99
99
//~^ ERROR cannot call non-const
100
100
] ;
101
101
102
102
static STATIC16 : ( & ' static Vec < MyOwned > , & ' static Vec < MyOwned > ) = (
103
- & vec ! [ MyOwned ] , //~ ERROR allocations are not allowed in statics
103
+ & vec ! [ MyOwned ] , //~ ERROR cannot call non-const
104
104
//~^ ERROR cannot call non-const
105
- & vec ! [ MyOwned ] , //~ ERROR allocations are not allowed in statics
105
+ & vec ! [ MyOwned ] , //~ ERROR cannot call non-const
106
106
//~^ ERROR cannot call non-const
107
107
) ;
108
108
109
109
static mut STATIC17 : SafeEnum = SafeEnum :: Variant1 ;
110
110
111
111
static STATIC19 : Vec < isize > = vec ! [ 3 ] ;
112
- //~^ ERROR allocations are not allowed in statics
112
+ //~^ ERROR cannot call non-const
113
113
//~^^ ERROR cannot call non-const
114
114
115
115
pub fn main ( ) {
116
116
let y = {
117
- static x: Vec < isize > = vec ! [ 3 ] ; //~ ERROR allocations are not allowed in statics
117
+ static x: Vec < isize > = vec ! [ 3 ] ; //~ ERROR cannot call non-const
118
118
//~^ ERROR cannot call non-const
119
119
x
120
120
//~^ ERROR cannot move out of static
0 commit comments