Skip to content

Commit 48ed678

Browse files
change loop invariant
1 parent 3fdf8cd commit 48ed678

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/str/pattern.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,8 +1958,8 @@ unsafe fn small_slice_eq(x: &[u8], y: &[u8]) -> bool {
19581958
unsafe {
19591959
let (mut px, mut py) = (x.as_ptr(), y.as_ptr());
19601960
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)
1961+
#[loop_invariant(safety::mem::same_allocation(x.as_ptr(), px)
1962+
&& safety::mem::same_allocation(y.as_ptr(), py)
19631963
&& px.addr() >= x.as_ptr().addr()
19641964
&& py.addr() >= y.as_ptr().addr()
19651965
&& px.addr() - x.as_ptr().addr() == py.addr() - y.as_ptr().addr())]

0 commit comments

Comments
 (0)