X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Fcore%2Fsrc%2Fptr%2Fmut_ptr.rs;h=0a2f63e3ec6a5fb1ecce6845f442790d1cfa7c4d;hb=59fcb7a2ce15f96fb4a0ce82f42503cf135aa81e;hp=ed1e3bd48122761607f22a10f0bfb11608c0d892;hpb=d3322e277311033bd6dd646b1ad7f2604db0c946;p=rust.git diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index ed1e3bd4812..0a2f63e3ec6 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -904,7 +904,7 @@ pub const fn guaranteed_ne(self, other: *mut T) -> Option /// This computes the same value that [`offset_from`](#method.offset_from) /// would compute, but with the added precondition that the offset is /// guaranteed to be non-negative. This method is equivalent to - /// `usize::from(self.offset_from(origin)).unwrap_unchecked()`, + /// `usize::try_from(self.offset_from(origin)).unwrap_unchecked()`, /// but it provides slightly more information to the optimizer, which can /// sometimes allow it to optimize slightly better with some backends. ///