Skip to content

Commit

Permalink
Rollup merge of rust-lang#61965 - phil-opp:patch-4, r=scottmcm
Browse files Browse the repository at this point in the history
Remove mentions of removed `offset_to` method from `align_offset` docs

The `offset_to` method was deleted in rust-lang#52814.

The replacement for the removed method is `wrapping_offset_from`. However, neither method takes an `usize` as argument, so I don't think that it makes sense to mention them.
  • Loading branch information
Centril committed Jul 29, 2019
2 parents 04b88a9 + c9c73f5 commit b20abcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ impl<T: ?Sized> *const T {
/// `usize::max_value()`.
///
/// The offset is expressed in number of `T` elements, and not bytes. The value returned can be
/// used with the `offset` or `offset_to` methods.
/// used with the `add` method.
///
/// There are no guarantees whatsover that offsetting the pointer will not overflow or go
/// beyond the allocation that the pointer points into. It is up to the caller to ensure that
Expand Down Expand Up @@ -2410,7 +2410,7 @@ impl<T: ?Sized> *mut T {
/// `usize::max_value()`.
///
/// The offset is expressed in number of `T` elements, and not bytes. The value returned can be
/// used with the `offset` or `offset_to` methods.
/// used with the `add` method.
///
/// There are no guarantees whatsover that offsetting the pointer will not overflow or go
/// beyond the allocation that the pointer points into. It is up to the caller to ensure that
Expand Down

0 comments on commit b20abcf

Please sign in to comment.