Skip to content

Commit bb7b844

Browse files
committed
Rename unsigned_offset_from to sub_ptr
1 parent 06817d1 commit bb7b844

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/intrinsics/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
721721
let diff_bytes = fx.bcx.ins().isub(ptr, base);
722722
// FIXME this can be an exact division.
723723
let diff = if intrinsic == sym::ptr_offset_from_unsigned {
724-
// Because diff_bytes ULT isize::MAX, this would be fine as signed,
724+
// Because diff_bytes ULE isize::MAX, this would be fine as signed,
725725
// but unsigned is slightly easier to codegen, so might as well.
726726
fx.bcx.ins().udiv_imm(diff_bytes, pointee_size as i64)
727727
} else {

0 commit comments

Comments
 (0)