Simplify some pointer method implementations#103701
Merged
bors merged 2 commits intorust-lang:masterfrom Nov 19, 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
|
Member
|
Looks good to me! Thanks. @bors r+ |
Collaborator
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Nov 18, 2022
…ation__--this-can-be-simplified, r=scottmcm Simplify some pointer method implementations - Make `pointer::with_metadata_of` const (+simplify implementation) (cc rust-lang#75091) - Simplify implementation of various pointer methods r? `@scottmcm` ---- `from_raw_parts::<T>(this, metadata(self))` was annoying me for a while and I've finally figured out how it should _actually_ be done.
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Nov 18, 2022
…ation__--this-can-be-simplified, r=scottmcm Simplify some pointer method implementations - Make `pointer::with_metadata_of` const (+simplify implementation) (cc rust-lang#75091) - Simplify implementation of various pointer methods r? ``@scottmcm`` ---- `from_raw_parts::<T>(this, metadata(self))` was annoying me for a while and I've finally figured out how it should _actually_ be done.
This was referenced Nov 18, 2022
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 18, 2022
…earth Rollup of 8 pull requests Successful merges: - rust-lang#102977 (remove HRTB from `[T]::is_sorted_by{,_key}`) - rust-lang#103378 (Fix mod_inv termination for the last iteration) - rust-lang#103456 (`unchecked_{shl|shr}` should use `u32` as the RHS) - rust-lang#103701 (Simplify some pointer method implementations) - rust-lang#104047 (Diagnostics `icu4x` based list formatting.) - rust-lang#104338 (Enforce that `dyn*` coercions are actually pointer-sized) - rust-lang#104498 (Edit docs for `rustc_errors::Handler::stash_diagnostic`) - rust-lang#104556 (rustdoc: use `code-header` class to format enum variants) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 10, 2023
…jubilee
Fix the docs for pointer method with_metadata_of
The name of the argument to `{*const T, *mut T}::with_metadata_of` was changed from `val` to `meta` recently, but the docs weren't updated to match.
Relevant pull request: rust-lang#103701
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.
pointer::with_metadata_ofconst (+simplify implementation) (cc Tracking Issue for [*const T|*mut T]::with_metadata_of #75091)r? @scottmcm
from_raw_parts::<T>(this, metadata(self))was annoying me for a while and I've finally figured out how it should actually be done.