]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/ptr/mut_ptr.rs
Rollup merge of #106811 - khuey:dwp_extension, r=davidtwco
[rust.git] / library / core / src / ptr / mut_ptr.rs
index ed1e3bd48122761607f22a10f0bfb11608c0d892..0a2f63e3ec6a5fb1ecce6845f442790d1cfa7c4d 100644 (file)
@@ -904,7 +904,7 @@ pub const fn guaranteed_ne(self, other: *mut T) -> Option<bool>
     /// 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.
     ///