Skip to content

Commit 44196af

Browse files
qinhepingcelinval
andauthored
Update library/core/src/str/pattern.rs
Co-authored-by: Celina G. Val <[email protected]>
1 parent b4b4f89 commit 44196af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/str/pattern.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1960,8 +1960,8 @@ unsafe fn small_slice_eq(x: &[u8], y: &[u8]) -> bool {
19601960
let (pxend, pyend) = (px.add(x.len() - 4), py.add(y.len() - 4));
19611961
#[loop_invariant(crate::ub_checks::same_allocation(x.as_ptr(), px)
19621962
&& crate::ub_checks::same_allocation(y.as_ptr(), py)
1963-
&& px as isize >= x.as_ptr() as isize
1964-
&& py as isize >= y.as_ptr() as isize
1963+
&& px.addr() >= x.addr()
1964+
&& py.addr() >= y.addr()
19651965
&& px as isize - x.as_ptr() as isize == (py as isize - y.as_ptr() as isize))]
19661966
while px < pxend {
19671967
let vx = (px as *const u32).read_unaligned();

0 commit comments

Comments
 (0)