Rename Unsafe to Safety

This commit is contained in:
Santiago Pastorino 2024-05-17 14:17:48 -03:00
parent 06f1ba4f65
commit 21f58e4bc4

View File

@ -670,11 +670,7 @@ fn bit_reverse(&mut self, width: u64, value: RValue<'gcc>) -> RValue<'gcc> {
let step3 = self.or(left, right); let step3 = self.or(left, right);
// Fourth step. // Fourth step.
if width == 8 { if width == 8 { step3 } else { self.gcc_bswap(step3, width) }
step3
} else {
self.gcc_bswap(step3, width)
}
} }
128 => { 128 => {
// TODO(antoyo): find a more efficient implementation? // TODO(antoyo): find a more efficient implementation?
@ -1225,7 +1221,7 @@ fn get_rust_try_fn<'a, 'gcc, 'tcx>(
iter::once(i8p), iter::once(i8p),
tcx.types.unit, tcx.types.unit,
false, false,
rustc_hir::Unsafety::Unsafe, rustc_hir::Safety::Unsafe,
Abi::Rust, Abi::Rust,
)), )),
); );
@ -1236,7 +1232,7 @@ fn get_rust_try_fn<'a, 'gcc, 'tcx>(
[i8p, i8p].iter().cloned(), [i8p, i8p].iter().cloned(),
tcx.types.unit, tcx.types.unit,
false, false,
rustc_hir::Unsafety::Unsafe, rustc_hir::Safety::Unsafe,
Abi::Rust, Abi::Rust,
)), )),
); );
@ -1245,7 +1241,7 @@ fn get_rust_try_fn<'a, 'gcc, 'tcx>(
[try_fn_ty, i8p, catch_fn_ty], [try_fn_ty, i8p, catch_fn_ty],
tcx.types.i32, tcx.types.i32,
false, false,
rustc_hir::Unsafety::Unsafe, rustc_hir::Safety::Unsafe,
Abi::Rust, Abi::Rust,
)); ));
let rust_try = gen_fn(cx, "__rust_try", rust_fn_sig, codegen); let rust_try = gen_fn(cx, "__rust_try", rust_fn_sig, codegen);