Rollup of 8 pull requests#151485
Closed
JonathanBrouwer wants to merge 16 commits intorust-lang:mainfrom
Closed
Conversation
This commit removes a repetitive match statement in favor of Option::map for Option::cloned.
Update compiler/rustc_monomorphize/src/collector.rs Add FIXME(mgca) comment to potentially re-investigate in the future. Co-Authored-By: Boxy <rust@boxyuwu.dev>
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.
…tgross35 Deduplicated float tests and unified in floats/mod.rs In this PR Float tests are deduplicated and are unified in floats/mod.rs, as discussed in rust-lang#141726. The moved float tests are: -> test_powf -> test_exp -> test_exp2 -> test_ln -> test_log_generic -> test_log2 -> test_log10 -> test_asinh -> test_acosh -> test_atanh -> test_gamma -> test_ln_gamma Closes: rust-lang#141726
…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.
Handle unevaluated ConstKind in in_operand fix: rust-lang#151248 r? BoxyUwU ~~I can't reproduce rust-lang#151246 in my local(x86_64-pc-windows-msvc) even before this change. 🤔 create a draft and test it in different environments.~~
Fix ICE: Don't try to evaluate type_consts when eagerly collecting items This fixes rust-lang#151246 The change is pretty straightforward if the Monomorphization strategy is eager which `-Clink-dead-code=true` sets. This then would lead to the existing code to try and evaluate a `type const` which does not have a body to evaluate leading to an ICE. The change is pretty straight forward just skip over type consts. This also seems like a sensible choice to me since a MonoItem can only be a Fn, Static, or Asm. A type const is none of the aforementioned. And even if it was added to the MonoItems list it would then later fail this check: https://github.com/rust-lang/rust/blob/fe98ddcfcfb6f185dbf4adeaf439d8a756da0273/compiler/rustc_monomorphize/src/collector.rs#L438-L440 Since that explicitly checks that the MonoItem's `DefKind` is static and not anything else. One more change is the addition of a simple test of the example code from rust-lang#151246 that checks that code compiles successfully with `-Clink-dead-code=true`. The only other change was to make the guard checks a little easier to read by making the logic more linear instead of one big if statement. r? @BoxyUwU @rustbot label +F-associated_const_equality +F-min_generic_const_args
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 comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 22, 2026
…uwer Rollup of 8 pull requests Successful merges: - #148206 (Deduplicated float tests and unified in floats/mod.rs) - #151042 (fix fallback impl for select_unpredictable intrinsic) - #151220 (option: Use Option::map in Option::cloned) - #151260 (Handle unevaluated ConstKind in in_operand) - #151441 (Fix ICE: Don't try to evaluate type_consts when eagerly collecting items) - #151465 (codegen: clarify some variable names around function calls) - #151469 (llvm: Tolerate dead_on_return attribute changes) - #151476 (Avoid `-> ()` in derived functions.) r? @ghost
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 0a1d3fa failed: CI. Failed job:
|
Contributor
Author
|
Looks spurious to me |
This comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 22, 2026
…uwer Rollup of 8 pull requests Successful merges: - #148206 (Deduplicated float tests and unified in floats/mod.rs) - #151042 (fix fallback impl for select_unpredictable intrinsic) - #151220 (option: Use Option::map in Option::cloned) - #151260 (Handle unevaluated ConstKind in in_operand) - #151441 (Fix ICE: Don't try to evaluate type_consts when eagerly collecting items) - #151465 (codegen: clarify some variable names around function calls) - #151469 (llvm: Tolerate dead_on_return attribute changes) - #151476 (Avoid `-> ()` in derived functions.) r? @ghost
Contributor
Author
|
Actually now that I'm looking at it again, this is probably #148206 Got mislead by the "warning: failed to connect to jobserver from environment variable" |
Contributor
Author
|
@bors cancel |
Contributor
|
Auto build cancelled. Cancelled workflows: The next pull request likely to be tested is #151485. |
This comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 22, 2026
…uwer Rollup of 8 pull requests Successful merges: - #148206 (Deduplicated float tests and unified in floats/mod.rs) - #151042 (fix fallback impl for select_unpredictable intrinsic) - #151220 (option: Use Option::map in Option::cloned) - #151260 (Handle unevaluated ConstKind in in_operand) - #151441 (Fix ICE: Don't try to evaluate type_consts when eagerly collecting items) - #151465 (codegen: clarify some variable names around function calls) - #151469 (llvm: Tolerate dead_on_return attribute changes) - #151476 (Avoid `-> ()` in derived functions.) r? @ghost
Contributor
Author
|
@bors r- cancel |
Contributor
|
📋 Only unclosed PRs can be unapproved. |
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