Make some docs nicer wrt pointer offsets#100821
Merged
bors merged 2 commits intorust-lang:masterfrom Aug 21, 2022
Merged
Conversation
Collaborator
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
scottmcm
reviewed
Aug 21, 2022
library/core/src/intrinsics.rs
Outdated
| @@ -2211,7 +2211,7 @@ pub(crate) fn is_nonoverlapping<T>(src: *const T, dst: *const T, count: usize) - | |||
| /// unsafe { | |||
| /// // The call to offset is always safe because `Vec` will never | |||
Member
There was a problem hiding this comment.
nit:
Suggested change
| /// // The call to offset is always safe because `Vec` will never | |
| /// // The call to add is always safe because `Vec` will never |
scottmcm
reviewed
Aug 21, 2022
scottmcm
reviewed
Aug 21, 2022
Member
|
Thanks for splitting these out :) @rustbot author |
Member
|
@bors r+ rollup |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 21, 2022
Make some docs nicer wrt pointer offsets This PR replaces `pointer::offset` with `pointer::add` and similarly `.cast().wrapping_add().cast()` with `.wrapping_byte_add()` **in docs**. r? `@scottmcm` _split off from #100746_
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 21, 2022
Make some docs nicer wrt pointer offsets This PR replaces `pointer::offset` with `pointer::add` and similarly `.cast().wrapping_add().cast()` with `.wrapping_byte_add()` **in docs**. r? ``@scottmcm`` _split off from #100746_
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 21, 2022
Make some docs nicer wrt pointer offsets This PR replaces `pointer::offset` with `pointer::add` and similarly `.cast().wrapping_add().cast()` with `.wrapping_byte_add()` **in docs**. r? ```@scottmcm``` _split off from #100746_
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 21, 2022
Make some docs nicer wrt pointer offsets This PR replaces `pointer::offset` with `pointer::add` and similarly `.cast().wrapping_add().cast()` with `.wrapping_byte_add()` **in docs**. r? ````@scottmcm```` _split off from #100746_
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 21, 2022
Make some docs nicer wrt pointer offsets This PR replaces `pointer::offset` with `pointer::add` and similarly `.cast().wrapping_add().cast()` with `.wrapping_byte_add()` **in docs**. r? `````@scottmcm````` _split off from #100746_
This was referenced Aug 21, 2022
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 21, 2022
…iaskrgr Rollup of 11 pull requests Successful merges: - rust-lang#100556 (Clamp Function for f32 and f64) - rust-lang#100663 (Make slice::reverse const) - rust-lang#100697 ( Minor syntax and formatting update to doc comment on `find_vtable_types_for_unsizing`) - rust-lang#100760 (update test for LLVM change) - rust-lang#100761 (some general mir typeck cleanup) - rust-lang#100775 (rustdoc: Merge source code pages HTML elements together v2) - rust-lang#100813 (Add `/build-rust-analyzer/` to .gitignore) - rust-lang#100821 (Make some docs nicer wrt pointer offsets) - rust-lang#100822 (Replace most uses of `pointer::offset` with `add` and `sub`) - rust-lang#100839 (Make doc for stdin field of process consistent) - rust-lang#100842 (Add diagnostics lints to `rustc_transmute` module (zero diags)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR replaces
pointer::offsetwithpointer::addand similarly.cast().wrapping_add().cast()with.wrapping_byte_add()in docs.r? @scottmcm
split off from #100746