Rollup of 5 pull requests#151484
Closed
JonathanBrouwer wants to merge 10 commits intorust-lang:mainfrom
Closed
Conversation
This commit removes a repetitive match statement in favor of Option::map for Option::cloned.
The attribute now has a size parameter and sorts differently: * Explicitly omit size parameter during construction on 23+ * Tolerate alternate sorting in tests llvm/llvm-project#171712
`hash` and `assert_receiver_is_total_eq` have no return type. This commit removes the `-> ()` that is currently printed for them.
…le-fallback, r=RalfJung
fix fallback impl for select_unpredictable intrinsic
`intrinsics::select_unpredictable` does not drop the value that is not selected, but the fallback impl did not consider this behavior. This creates an observable difference between Miri and actual execution, and possibly does not play well with the `core::hint` version which has extra logic to drop the value that was not selected.
```rust
#![feature(core_intrinsics)]
fn main() {
core::intrinsics::select_unpredictable(true, LoudDrop(0), LoudDrop(1));
// cargo run: "0"; cargo miri run: "1 0"
}
struct LoudDrop(u8);
impl Drop for LoudDrop {
fn drop(&mut self) {
print!("{} ", self.0);
}
}
```
This change let me remove the `T: [const] Destruct` bound as well, since the destructor is no longer relevant.
option: Use Option::map in Option::cloned This commit removes a repetitive match statement in favor of Option::map for Option::cloned.
codegen: clarify some variable names around function calls I looked at rust-lang#145932 to try to understand how it works, and quickly got lost in the variable names -- what refers to the caller, what to the callee? So here's my attempt at making those more clear. Hopefully the new names are correct.^^ Cc @JamieCunliffe
llvm: Tolerate dead_on_return attribute changes The attribute now has a size parameter and sorts differently. Adjust tests to tolerate this. llvm/llvm-project#171712 r? durin42 @rustbot label llvm-main
…ve, r=Kobzol Avoid `-> ()` in derived functions. `hash` and `assert_receiver_is_total_eq` have no return type. This commit removes the `-> ()` that is currently printed for them. r? @Kobzol
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
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.
Successful merges:
-> ()in derived functions. #151476 (Avoid-> ()in derived functions.)r? @ghost
Create a similar rollup