@@ -11,6 +11,7 @@ input_file: c2rust-transpile/tests/snapshots/macros.c
1111 unused_assignments ,
1212 unused_mut
1313)]
14+ #! [feature (raw_ref_op )]
1415extern " C" {
1516 fn extern_fn () - > ::core ::ffi ::c_int ;
1617}
@@ -107,10 +108,9 @@ pub unsafe extern "C" fn local_muts() {
107108 ::core ::mem ::transmute ::< [u8 ; 18 ], [::core ::ffi ::c_char ; 18 ]> (* b " hello hello world\0 " );
108109 let mut builtin: ::core ::ffi ::c_int =
109110 (LITERAL_INT as ::core ::ffi ::c_uint ).leading_zeros () as i32 ;
110- let mut ref_indexing: *const ::core ::ffi ::c_char = & * NESTED_STR
111+ let mut ref_indexing: *const ::core ::ffi ::c_char = & raw const * NESTED_STR
111112 .as_ptr ()
112- .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize )
113- as *const ::core ::ffi ::c_char ;
113+ .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize );
114114 let mut ref_struct: *const S = & mut LITERAL_STRUCT as *mut S ;
115115 let mut ternary: ::core ::ffi ::c_int = if LITERAL_BOOL != 0 {
116116 1 as ::core ::ffi ::c_int
@@ -177,10 +177,9 @@ pub unsafe extern "C" fn local_consts() {
177177 let str_concatenation: [::core ::ffi ::c_char ; 18 ] =
178178 ::core ::mem ::transmute ::< [u8 ; 18 ], [::core ::ffi ::c_char ; 18 ]> (* b " hello hello world\0 " );
179179 let builtin: ::core ::ffi ::c_int = (LITERAL_INT as ::core ::ffi ::c_uint ).leading_zeros () as i32 ;
180- let ref_indexing: *const ::core ::ffi ::c_char = & * NESTED_STR
180+ let ref_indexing: *const ::core ::ffi ::c_char = & raw const * NESTED_STR
181181 .as_ptr ()
182- .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize )
183- as *const ::core ::ffi ::c_char ;
182+ .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize );
184183 let ref_struct: *const S = & mut LITERAL_STRUCT as *mut S ;
185184 let ternary: ::core ::ffi ::c_int = if LITERAL_BOOL != 0 {
186185 1 as ::core ::ffi ::c_int
@@ -370,7 +369,7 @@ pub static mut fns: fn_ptrs = {
370369 init
371370};
372371#[no_mangle ]
373- pub static mut p : * const fn_ptrs = unsafe { &fns };
372+ pub static mut p : * const fn_ptrs = unsafe { &raw const fns };
374373pub const ZSTD_WINDOWLOG_MAX_32: ::core ::ffi ::c_int = 30 as ::core ::ffi ::c_int ;
375374pub const ZSTD_WINDOWLOG_MAX_64: ::core ::ffi ::c_int = 31 as ::core ::ffi ::c_int ;
376375#[no_mangle ]
@@ -384,7 +383,7 @@ pub unsafe extern "C" fn test_zstd() -> U64 {
384383#[no_mangle]
385384pub unsafe extern "C" fn stmt_expr_inc() -> ::core::ffi::c_int {
386385 let mut a : ::core ::ffi ::c_int = 0 as ::core ::ffi ::c_int ;
387- let mut b : * mut ::core ::ffi ::c_int = & mut a ;
386+ let mut b : * mut ::core ::ffi ::c_int = & raw mut a ;
388387 ({
389388 *b += 1;
390389 *b;
@@ -446,10 +445,9 @@ pub unsafe extern "C" fn late_init_var() -> ::core::ffi::c_int {
446445unsafe extern "C" fn run_static_initializers() {
447446 global_static_const_ptr_arithmetic = PTR_ARITHMETIC ;
448447 global_static_const_indexing = NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_int as usize ];
449- global_static_const_ref_indexing = & * NESTED_STR
448+ global_static_const_ref_indexing = & raw const * NESTED_STR
450449 .as_ptr ()
451- .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize )
452- as *const ::core ::ffi ::c_char ;
450+ .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize );
453451 global_static_const_ternary = if LITERAL_BOOL != 0 {
454452 1 as ::core ::ffi ::c_int
455453 } else {
@@ -458,10 +456,9 @@ unsafe extern "C" fn run_static_initializers() {
458456 global_static_const_member = LITERAL_STRUCT .i ;
459457 global_const_ptr_arithmetic = PTR_ARITHMETIC ;
460458 global_const_indexing = NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_int as usize ];
461- global_const_ref_indexing = & * NESTED_STR
459+ global_const_ref_indexing = & raw const * NESTED_STR
462460 .as_ptr ()
463- .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize )
464- as *const ::core ::ffi ::c_char ;
461+ .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize );
465462 global_const_ternary = if LITERAL_BOOL != 0 {
466463 1 as ::core ::ffi ::c_int
467464 } else {
0 commit comments