File tree 2 files changed +2
-7
lines changed
c2rust-transpile/src/translator
2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -736,12 +736,7 @@ impl<'c> Translation<'c> {
736
736
"Cannot use wrapping offset from in a const expression" ,
737
737
) ) ;
738
738
}
739
- // The wrapping_offset_from method is locked behind a feature gate
740
- // and replaces the now deprecated offset_to (opposite argument order)
741
- // wrapping_offset_from panics when the pointee is a ZST
742
- self . use_feature ( "ptr_wrapping_offset_from" ) ;
743
-
744
- let mut offset = mk ( ) . method_call_expr ( lhs, "wrapping_offset_from" , vec ! [ rhs] ) ;
739
+ let mut offset = mk ( ) . method_call_expr ( lhs, "offset_from" , vec ! [ rhs] ) ;
745
740
746
741
if let Some ( sz) = self . compute_size_of_expr ( pointee. ctype ) {
747
742
let div = cast_int ( sz, "isize" , false ) ;
Original file line number Diff line number Diff line change 1
- //! feature_c_variadic, feature_ptr_wrapping_offset_from
1
+ //! feature_c_variadic
2
2
3
3
extern crate libc;
4
4
You can’t perform that action at this time.
0 commit comments