@@ -79,7 +79,7 @@ static STATIC10: UnsafeStruct = UnsafeStruct;
7979struct MyOwned ;
8080
8181static STATIC11 : Vec < MyOwned > = vec ! [ MyOwned ] ;
82- //~^ ERROR allocations are not allowed in statics
82+ //~^ ERROR cannot call non-const
8383//~^^ ERROR cannot call non-const
8484
8585static mut STATIC12 : UnsafeStruct = UnsafeStruct ;
@@ -93,28 +93,28 @@ static mut STATIC14: SafeStruct = SafeStruct {
9393} ;
9494
9595static STATIC15 : & ' static [ Vec < MyOwned > ] = & [
96- vec ! [ MyOwned ] , //~ ERROR allocations are not allowed in statics
96+ vec ! [ MyOwned ] , //~ ERROR cannot call non-const
9797 //~^ ERROR cannot call non-const
98- vec ! [ MyOwned ] , //~ ERROR allocations are not allowed in statics
98+ vec ! [ MyOwned ] , //~ ERROR cannot call non-const
9999 //~^ ERROR cannot call non-const
100100] ;
101101
102102static 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
104104 //~^ ERROR cannot call non-const
105- & vec ! [ MyOwned ] , //~ ERROR allocations are not allowed in statics
105+ & vec ! [ MyOwned ] , //~ ERROR cannot call non-const
106106 //~^ ERROR cannot call non-const
107107) ;
108108
109109static mut STATIC17 : SafeEnum = SafeEnum :: Variant1 ;
110110
111111static STATIC19 : Vec < isize > = vec ! [ 3 ] ;
112- //~^ ERROR allocations are not allowed in statics
112+ //~^ ERROR cannot call non-const
113113//~^^ ERROR cannot call non-const
114114
115115pub fn main ( ) {
116116 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
118118 //~^ ERROR cannot call non-const
119119 x
120120 //~^ ERROR cannot move out of static
0 commit comments