-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 6 pull requests #97632
Merged
Merged
Rollup of 6 pull requests #97632
Conversation
This file contains 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
Split out from rust-lang#94247 This adds the following methods to raw slices that already exist on regular slices * `*mut [T]::is_empty` * `*mut [T]::split_at_mut` * `*mut [T]::split_at_unchecked` These methods reduce the amount of unsafe code needed to migrate ChunksMut and related iterators to raw slices (rust-lang#94247) Co-authored-by:: The 8472 <[email protected]>
`&mut [T]` implies validity which automatically makes `ptr::add` ok within its bounds. But `*mut [T]` does not. Since we still want the benefits of in-bounds pointer arithmetic `split_at_must` must require the caller to pass valid pointers and therefore it is `unsafe`.
…r_from_bad_type_plus`.
Co-authored-by: Guillaume Gomez <[email protected]>
Additional `*mut [T]` methods Split out from rust-lang#94247 This adds the following methods to raw slices that already exist on regular slices * `*mut [T]::is_empty` * `*mut [T]::split_at_mut` * `*mut [T]::split_at_mut_unchecked` These methods reduce the amount of unsafe code needed to migrate `ChunksMut` and related iterators to raw slices (rust-lang#94247) r? `@m-ou-se`
…mpls-dup, r=GuillaumeGomez rustdoc: avoid including impl blocks with filled-in generics Fixes rust-lang#94937 # Before ![image](https://user-images.githubusercontent.com/1593513/168933282-02ccc4ae-9c89-4836-ba34-e2bd83946105.png) # After ![image](https://user-images.githubusercontent.com/1593513/168933255-4c17407d-d8d1-406e-87f5-9ea809437173.png)
…estebank Move conditions out of recover/report functions. `Parser` has six recover/report functions that are passed a boolean, and nothing is done if the boolean has a particular value. This PR moves the tests outside the functions. This has the following effects. - The number of lines of code goes down. - Some `use` items become shorter. - Avoids the strangeness whereby 11 out of 12 calls to `maybe_recover_from_bad_qpath` pass `true` as the second argument. - Makes it clear at the call site that only one of `maybe_recover_from_bad_type_plus` and `maybe_report_ambiguous_plus` will be run. r? `@estebank`
…-obk Mention filename in suggestion when it differs from primary span
…e, r=GuillaumeGomez rustdoc: Improve calculation of "Impls on Foreign Types" The existing code to calculate whether an implementation was on a "Foreign Type" was duplicated across the sidebar generation and the page generation. It also came to the wrong conclusion for some cases where both the trait and the "for" type were re-exports. This PR extracts the logic into a method of `Impl`, breaks it into a multi-line method so it can be commented, and adds a case for when the trait and the "for" type came from the same crate. This fixes some cases - like the platform-specific integer types (`__m256`, `__m128`, etc). But it doesn't fix all cases. See the screenshots below. [Before](https://doc.rust-lang.org/nightly/std/clone/trait.Clone.html#foreign-impls): <img src="https://user-images.githubusercontent.com/220205/171338226-59ce6daf-3d76-4bad-bc8d-72a8259a8f43.png" width=200> [After](https://rustdoc.crud.net/jsha/implementation-is-on-local-type/std/clone/trait.Clone.html): <img src="https://user-images.githubusercontent.com/220205/171338147-28308a65-1597-4223-be47-9550062404dd.png" width=200> The remaining types (`CString`, `NulError`, etc) are all from the `alloc` crate, while the `Clone` trait is from the `core` crate. Since `CString` and `Clone` are both re-exported by `std`, they are logically local to each other, but I couldn't figure out a good way to detect that in this code. I figure this is still a good step forward. Related: rust-lang#97610 r? `@camelid`
rename PointerAddress → PointerExposeAddress `PointerAddress` sounds a bit too much like `ptr.addr()`, but this corresponds to `ptr.expose_addr()`. r? `@tmiasko`
rustbot
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
rollup
A PR which is a rollup
labels
Jun 1, 2022
@bors r+ rollup=never p=6 |
📌 Commit b78c118 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Jun 1, 2022
☀️ Test successful - checks-actions |
This was referenced Jun 2, 2022
Finished benchmarking commit (e838059): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
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.
Successful merges:
*mut [T]
methods #95594 (Additional*mut [T]
methods)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup