Skip to content

Commit

Permalink
Update library/core/src/str/pattern.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Celina G. Val <[email protected]>
  • Loading branch information
qinheping and celinval authored Nov 8, 2024
1 parent b4b4f89 commit 44196af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/str/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1960,8 +1960,8 @@ unsafe fn small_slice_eq(x: &[u8], y: &[u8]) -> bool {
let (pxend, pyend) = (px.add(x.len() - 4), py.add(y.len() - 4));
#[loop_invariant(crate::ub_checks::same_allocation(x.as_ptr(), px)
&& crate::ub_checks::same_allocation(y.as_ptr(), py)
&& px as isize >= x.as_ptr() as isize
&& py as isize >= y.as_ptr() as isize
&& px.addr() >= x.addr()
&& py.addr() >= y.addr()
&& px as isize - x.as_ptr() as isize == (py as isize - y.as_ptr() as isize))]
while px < pxend {
let vx = (px as *const u32).read_unaligned();
Expand Down

0 comments on commit 44196af

Please sign in to comment.