Skip to content

Commit 9cd8624

Browse files
committed
interpret, ptr_offset_from: refactor and test too-far-apart check
1 parent 148a78e commit 9cd8624

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/ptr/const_ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ impl<T: ?Sized> *const T {
726726
/// }
727727
///
728728
/// // This would be incorrect, as the pointers are not correctly ordered:
729-
/// // ptr1.offset_from(ptr2)
729+
/// // ptr1.sub_ptr(ptr2)
730730
/// ```
731731
#[unstable(feature = "ptr_sub_ptr", issue = "95892")]
732732
#[rustc_const_unstable(feature = "const_ptr_sub_ptr", issue = "95892")]

0 commit comments

Comments
 (0)