-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rollup of 7 pull requests #92587
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
Merged
Rollup of 7 pull requests #92587
Conversation
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
The src pointers in CopyOnDrop and InsertionHole used to be *mut T, and were derived via automatic conversion from &mut T. According to Stacked Borrows 2.1, this means that those pointers become invalidated by interior mutation in the comparison function. But there's no need for mutability in this code path. Thus, we can change the drop guards to use *const and derive those from &T.
Add comment about why `LocalDefId` should not be `Ord` Also fix some formatting in the doc comment.
Update library/core/src/hint.rs Co-authored-by: Amanieu d'Antras <amanieu@gmail.com> Remove redundant config gate
This makes it more uniform with other expanded nodes
…elhenrymantilla Drop guards in slice sorting derive src pointers from &mut T, which is invalidated by interior mutation in comparison I tried to run https://github.com/rust-lang/miri-test-libstd on `alloc` with `-Zmiri-track-raw-pointers`, and got a failure on the test `slice::panic_safe`. The test failure has nothing to do with panic safety, it's from how the test tests for panic safety. I minimized the test failure into this very silly program: ```rust use std::cell::Cell; use std::cmp::Ordering; #[derive(Clone)] struct Evil(Cell<usize>); fn main() { let mut input = vec![Evil(Cell::new(0)); 3]; // Hits the bug pattern via CopyOnDrop in core input.sort_unstable_by(|a, _b| { a.0.set(0); Ordering::Less }); // Hits the bug pattern via InsertionHole in alloc input.sort_by(|_a, b| { b.0.set(0); Ordering::Less }); } ``` To fix this, I'm just removing the mutability/uniqueness where it wasn't required.
Fix a minor mistake in `String::try_reserve_exact` examples The examples of `String::try_reserve_exact` didn't actually use `try_reserve_exact`, which was probably a minor mistake, and this PR fixed it.
…n1011 Add negative `impl` for `Ord`, `PartialOrd` on `LocalDefId` Suggested in rust-lang#92233 (comment). This also fixes some formatting in the doc comment. r? `@cjgillot`
Stabilize `result_cloned` and `result_copied` Tracking issue: rust-lang#63168 The FCP is now completed.
…manieu Add RISC-V detection macro and more architecture instructions This pull request includes: - Update `stdarch` dependency to include ratified RISC-V supervisor and hypervisor instruction intrinsics which is useful in Rust kernel development - Add macro `is_riscv_feature_detected!` - Modify impl of `core::hint::spin_loop` to comply with latest version of `core::arch` After this update, users may now develop RISC-V kernels and user applications more freely. r? `@Amanieu`
ast: Always keep a `NodeId` in `ast::Crate` This makes it more uniform with other expanded nodes. It makes generic code in rust-lang#92573 simpler in particular. This is another follow-up to rust-lang#91313. r? `@Aaron1011`
…=lnicola ⬆️ rust-analyzer r? `@ghost`
@bors r+ rollup=never p=7 |
📌 Commit 439a125 has been approved by |
☀️ Test successful - checks-actions |
This was referenced Jan 5, 2022
Finished benchmarking commit (f1ce0e6): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
# for free
to join this conversation on GitHub.
Already have an account?
# 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.
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:
String::try_reserve_exact
examples #92388 (Fix a minor mistake inString::try_reserve_exact
examples)impl
forOrd
,PartialOrd
onLocalDefId
#92442 (Add negativeimpl
forOrd
,PartialOrd
onLocalDefId
)result_cloned
andresult_copied
#92483 (Stabilizeresult_cloned
andresult_copied
)NodeId
inast::Crate
#92575 (ast: Always keep aNodeId
inast::Crate
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup