Skip to content

Commit b515bbf

Browse files
committed
fix a typo in documentation of pointer::sub_ptr()
1 parent ffd978b commit b515bbf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/core/src/ptr/const_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ impl<T: ?Sized> *const T {
704704
/// but it provides slightly more information to the optimizer, which can
705705
/// sometimes allow it to optimize slightly better with some backends.
706706
///
707-
/// This method can be though of as recovering the `count` that was passed
707+
/// This method can be thought of as recovering the `count` that was passed
708708
/// to [`add`](#method.add) (or, with the parameters in the other order,
709709
/// to [`sub`](#method.sub)). The following are all equivalent, assuming
710710
/// that their safety preconditions are met:

library/core/src/ptr/mut_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ impl<T: ?Sized> *mut T {
867867
/// but it provides slightly more information to the optimizer, which can
868868
/// sometimes allow it to optimize slightly better with some backends.
869869
///
870-
/// This method can be though of as recovering the `count` that was passed
870+
/// This method can be thought of as recovering the `count` that was passed
871871
/// to [`add`](#method.add) (or, with the parameters in the other order,
872872
/// to [`sub`](#method.sub)). The following are all equivalent, assuming
873873
/// that their safety preconditions are met:

0 commit comments

Comments
 (0)