We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4b4f89 commit 44196afCopy full SHA for 44196af
library/core/src/str/pattern.rs
@@ -1960,8 +1960,8 @@ unsafe fn small_slice_eq(x: &[u8], y: &[u8]) -> bool {
1960
let (pxend, pyend) = (px.add(x.len() - 4), py.add(y.len() - 4));
1961
#[loop_invariant(crate::ub_checks::same_allocation(x.as_ptr(), px)
1962
&& 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
+ && px.addr() >= x.addr()
+ && py.addr() >= y.addr()
1965
&& px as isize - x.as_ptr() as isize == (py as isize - y.as_ptr() as isize))]
1966
while px < pxend {
1967
let vx = (px as *const u32).read_unaligned();
0 commit comments