@@ -43,6 +43,11 @@ pub const LITERAL_FLOAT: ::core::ffi::c_double = 3.14f64;
4343pub const LITERAL_CHAR: ::core ::ffi ::c_int = ' x' as ::core ::ffi ::c_int ;
4444pub const LITERAL_STR: [::core ::ffi ::c_char ; 6 ] =
4545 unsafe { ::core ::mem ::transmute ::< [u8 ; 6 ], [::core ::ffi ::c_char ; 6 ]> (* b " hello\0 " ) };
46+ pub const LITERAL_ARRAY: [::core ::ffi ::c_int ; 3 ] = [
47+ 1 as ::core ::ffi ::c_int ,
48+ 2 as ::core ::ffi ::c_int ,
49+ 3 as ::core ::ffi ::c_int ,
50+ ];
4651pub const LITERAL_STRUCT: S = S {
4752 i: 5 as ::core ::ffi ::c_int ,
4853};
@@ -51,6 +56,7 @@ pub const NESTED_BOOL: ::core::ffi::c_int = LITERAL_BOOL;
5156pub const NESTED_FLOAT: ::core ::ffi ::c_double = LITERAL_FLOAT ;
5257pub const NESTED_CHAR: ::core ::ffi ::c_int = LITERAL_CHAR ;
5358pub const NESTED_STR: [::core ::ffi ::c_char ; 6 ] = LITERAL_STR ;
59+ pub const NESTED_ARRAY: [::core ::ffi ::c_int ; 3 ] = LITERAL_ARRAY ;
5460pub const NESTED_STRUCT: S = LITERAL_STRUCT ;
5561pub const PARENS: ::core ::ffi ::c_int = NESTED_INT * (LITERAL_CHAR + true_0 );
5662pub const PTR_ARITHMETIC: *const ::core ::ffi ::c_char = unsafe {
@@ -69,23 +75,15 @@ pub unsafe extern "C" fn local_muts() {
6975 let mut literal_char: ::core ::ffi ::c_char = LITERAL_CHAR as ::core ::ffi ::c_char ;
7076 let mut literal_str_ptr: *const ::core ::ffi ::c_char = LITERAL_STR .as_ptr ();
7177 let mut literal_str: [::core ::ffi ::c_char ; 6 ] = LITERAL_STR ;
72- let mut literal_array: [::core ::ffi ::c_int ; 3 ] = [
73- 1 as ::core ::ffi ::c_int ,
74- 2 as ::core ::ffi ::c_int ,
75- 3 as ::core ::ffi ::c_int ,
76- ];
78+ let mut literal_array: [::core ::ffi ::c_int ; 3 ] = LITERAL_ARRAY ;
7779 let mut literal_struct: S = LITERAL_STRUCT ;
7880 let mut nested_int: ::core ::ffi ::c_int = NESTED_INT ;
7981 let mut nested_bool: bool = NESTED_BOOL != 0 ;
8082 let mut nested_float: ::core ::ffi ::c_float = NESTED_FLOAT as ::core ::ffi ::c_float ;
8183 let mut nested_char: ::core ::ffi ::c_char = NESTED_CHAR as ::core ::ffi ::c_char ;
8284 let mut nested_str_ptr: *const ::core ::ffi ::c_char = NESTED_STR .as_ptr ();
8385 let mut nested_str: [::core ::ffi ::c_char ; 6 ] = NESTED_STR ;
84- let mut nested_array: [::core ::ffi ::c_int ; 3 ] = [
85- 1 as ::core ::ffi ::c_int ,
86- 2 as ::core ::ffi ::c_int ,
87- 3 as ::core ::ffi ::c_int ,
88- ];
86+ let mut nested_array: [::core ::ffi ::c_int ; 3 ] = NESTED_ARRAY ;
8987 let mut nested_struct: S = NESTED_STRUCT ;
9088 let mut negative_int: ::core ::ffi ::c_int = - LITERAL_INT ;
9189 let mut int_arithmetic: ::core ::ffi ::c_int = NESTED_INT + LITERAL_INT + 1 as ::core ::ffi ::c_int ;
@@ -142,23 +140,15 @@ pub unsafe extern "C" fn local_consts() {
142140 let literal_char: ::core ::ffi ::c_char = LITERAL_CHAR as ::core ::ffi ::c_char ;
143141 let literal_str_ptr: *const ::core ::ffi ::c_char = LITERAL_STR .as_ptr ();
144142 let literal_str: [::core ::ffi ::c_char ; 6 ] = LITERAL_STR ;
145- let literal_array: [::core ::ffi ::c_int ; 3 ] = [
146- 1 as ::core ::ffi ::c_int ,
147- 2 as ::core ::ffi ::c_int ,
148- 3 as ::core ::ffi ::c_int ,
149- ];
143+ let literal_array: [::core ::ffi ::c_int ; 3 ] = LITERAL_ARRAY ;
150144 let literal_struct: S = LITERAL_STRUCT ;
151145 let nested_int: ::core ::ffi ::c_int = NESTED_INT ;
152146 let nested_bool: bool = NESTED_BOOL != 0 ;
153147 let nested_float: ::core ::ffi ::c_float = NESTED_FLOAT as ::core ::ffi ::c_float ;
154148 let nested_char: ::core ::ffi ::c_char = NESTED_CHAR as ::core ::ffi ::c_char ;
155149 let nested_str_ptr: *const ::core ::ffi ::c_char = NESTED_STR .as_ptr ();
156150 let nested_str: [::core ::ffi ::c_char ; 6 ] = NESTED_STR ;
157- let nested_array: [::core ::ffi ::c_int ; 3 ] = [
158- 1 as ::core ::ffi ::c_int ,
159- 2 as ::core ::ffi ::c_int ,
160- 3 as ::core ::ffi ::c_int ,
161- ];
151+ let nested_array: [::core ::ffi ::c_int ; 3 ] = NESTED_ARRAY ;
162152 let nested_struct: S = NESTED_STRUCT ;
163153 let negative_int: ::core ::ffi ::c_int = - LITERAL_INT ;
164154 let int_arithmetic: ::core ::ffi ::c_int = NESTED_INT + LITERAL_INT + 1 as ::core ::ffi ::c_int ;
@@ -213,11 +203,7 @@ static mut global_static_const_literal_char: ::core::ffi::c_char =
213203 LITERAL_CHAR as ::core ::ffi ::c_char ;
214204static mut global_static_const_literal_str_ptr : * const ::core: :ffi ::c_char = LITERAL_STR .as_ptr ();
215205static mut global_static_const_literal_str : [::core ::ffi ::c_char ; 6 ] = LITERAL_STR ;
216- static mut global_static_const_literal_array : [::core ::ffi ::c_int ; 3 ] = [
217- 1 as ::core ::ffi ::c_int ,
218- 2 as ::core ::ffi ::c_int ,
219- 3 as ::core ::ffi ::c_int ,
220- ];
206+ static mut global_static_const_literal_array : [::core ::ffi ::c_int ; 3 ] = LITERAL_ARRAY ;
221207static mut global_static_const_literal_struct : S = LITERAL_STRUCT ;
222208static mut global_static_const_nested_int : ::core ::ffi ::c_int = NESTED_INT ;
223209static mut global_static_const_nested_bool : bool = NESTED_BOOL != 0 ;
@@ -227,11 +213,7 @@ static mut global_static_const_nested_char: ::core::ffi::c_char =
227213 NESTED_CHAR as ::core ::ffi ::c_char ;
228214static mut global_static_const_nested_str_ptr : * const ::core: :ffi ::c_char = NESTED_STR .as_ptr ();
229215static mut global_static_const_nested_str : [::core ::ffi ::c_char ; 6 ] = NESTED_STR ;
230- static mut global_static_const_nested_array : [::core ::ffi ::c_int ; 3 ] = [
231- 1 as ::core ::ffi ::c_int ,
232- 2 as ::core ::ffi ::c_int ,
233- 3 as ::core ::ffi ::c_int ,
234- ];
216+ static mut global_static_const_nested_array : [::core ::ffi ::c_int ; 3 ] = NESTED_ARRAY ;
235217static mut global_static_const_nested_struct : S = NESTED_STRUCT ;
236218static mut global_static_const_negative_int : ::core ::ffi ::c_int = - LITERAL_INT ;
237219static mut global_static_const_int_arithmetic : ::core ::ffi ::c_int =
@@ -275,11 +257,7 @@ pub static mut global_const_literal_str_ptr: *const ::core::ffi::c_char = LITERA
275257#[no_mangle ]
276258pub static mut global_const_literal_str : [::core ::ffi ::c_char ; 6 ] = LITERAL_STR ;
277259#[no_mangle ]
278- pub static mut global_const_literal_array : [::core ::ffi ::c_int ; 3 ] = [
279- 1 as ::core ::ffi ::c_int ,
280- 2 as ::core ::ffi ::c_int ,
281- 3 as ::core ::ffi ::c_int ,
282- ];
260+ pub static mut global_const_literal_array : [::core ::ffi ::c_int ; 3 ] = LITERAL_ARRAY ;
283261#[no_mangle ]
284262pub static mut global_const_literal_struct : S = LITERAL_STRUCT ;
285263#[no_mangle ]
@@ -296,11 +274,7 @@ pub static mut global_const_nested_str_ptr: *const ::core::ffi::c_char = NESTED_
296274#[no_mangle ]
297275pub static mut global_const_nested_str : [::core ::ffi ::c_char ; 6 ] = NESTED_STR ;
298276#[no_mangle ]
299- pub static mut global_const_nested_array : [::core ::ffi ::c_int ; 3 ] = [
300- 1 as ::core ::ffi ::c_int ,
301- 2 as ::core ::ffi ::c_int ,
302- 3 as ::core ::ffi ::c_int ,
303- ];
277+ pub static mut global_const_nested_array : [::core ::ffi ::c_int ; 3 ] = NESTED_ARRAY ;
304278#[no_mangle ]
305279pub static mut global_const_nested_struct : S = NESTED_STRUCT ;
306280#[no_mangle ]
0 commit comments