We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fdf8cd commit 48ed678Copy full SHA for 48ed678
library/core/src/str/pattern.rs
@@ -1958,8 +1958,8 @@ unsafe fn small_slice_eq(x: &[u8], y: &[u8]) -> bool {
1958
unsafe {
1959
let (mut px, mut py) = (x.as_ptr(), y.as_ptr());
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)
+ #[loop_invariant(safety::mem::same_allocation(x.as_ptr(), px)
+ && safety::mem::same_allocation(y.as_ptr(), py)
1963
&& px.addr() >= x.as_ptr().addr()
1964
&& py.addr() >= y.as_ptr().addr()
1965
&& px.addr() - x.as_ptr().addr() == py.addr() - y.as_ptr().addr())]
0 commit comments