-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Rollup of 8 pull requests #151485
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 8 pull requests #151485
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
|
@bors r+ rollup=never p=5 |
This comment has been minimized.
This comment has been minimized.
…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
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
💔 Test for 0a1d3fa failed: CI. Failed job:
|
|
Looks spurious to me |
This comment has been minimized.
This comment has been minimized.
…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
|
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" |
|
@bors cancel |
|
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.
…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
|
@bors r- cancel |
|
📋 Only unclosed PRs can be unapproved. |
Successful merges:
-> ()in derived functions. #151476 (Avoid-> ()in derived functions.)r? @ghost
Create a similar rollup