Skip to content

Rollup of 10 pull requests #137511

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

Merged
merged 28 commits into from
Feb 24, 2025
Merged

Rollup of 10 pull requests #137511

merged 28 commits into from
Feb 24, 2025

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Feb 24, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

GuillaumeGomez and others added 28 commits February 14, 2025 11:41
library/core/src/future/mod.rs with issue = "none"
…kely to collide with symbol name mangling
As the comment at the top says, this file is not supposed to contain any
code. But some has crept in. This commit moves it out.
Fixed issue with usage of generics and moved feature gate to crate root

Removed const tag

Fixed alphabetical ordering of feature gate, added same to doctest

Removed crate-level declaration of feature gate control_flow_into_value

Used const_precise_live_drops to constify into_value without issue of a drop
Currently, this error emit a diagnostic with no context like:

    error: `compiler_builtins` cannot call functions through upstream monomorphizations; encountered invalid call from `<math::libm::support::hex_float::Hexf<i32> as core::fmt::LowerHex>::fmt` to `core::fmt::num::<impl core::fmt::LowerHex for i32>::fmt`

With this change, it at least usually points to the problematic
function:

    error: `compiler_builtins` cannot call functions through upstream monomorphizations; encountered invalid call from `<math::libm::support::hex_float::Hexf<i32> as core::fmt::LowerHex>::fmt` to `core::fmt::num::<impl core::fmt::LowerHex for i32>::fmt`
       --> src/../libm/src/math/support/hex_float.rs:270:5
        |
    270 |     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
Allow `IndexSlice` to be indexed by ranges.

This comes with some annoyances as the index type can no longer inferred from indexing expressions. The biggest offender for this is `IndexVec::from_fn_n(|idx| ..., n)` where the index type won't be inferred from the call site or any index expressions inside the closure.

My main use case for this is mapping a `Place` to `Range<Idx>` for value tracking where the range represents all the values the place contains.
…triddle

[rustdoc] Add new setting to wrap source code lines when too long

Fixes rust-lang#127334.

Wrapped lines look like this:

![image](https://github.com/user-attachments/assets/92006a27-ed1e-4beb-91f2-f453b72c5e1a)

It works in both source code pages and doc pages.

You can test it [here](https://rustdoc.crud.net/imperio/code-wrapping/bar/index.html).

r? ``@notriddle``
…ng#76249, r=ibraheemdev

Unstable `gen_future` Feature Tracking

This PR removes the reference to the closed tracking issue **rust-lang#50547** for the `gen_future` feature. Since `gen_future` is an internal feature used in async block desugaring, it does not require a public tracking issue.

#### Changes:
- Replaced `issue = "50547"` with `issue = "none"` in **library/core/src/future/mod.rs**.
- Ensures that it is correctly identified as an internal feature.

#### Rationale:
With this change, the Unstable Book will now state:
> *"This feature has no tracking issue and is therefore likely internal to the compiler, not being intended for general use."*

Closes **rust-lang#76249**. 🚀🦀
…lize, r=Amanieu

Stabilize `unbounded_shifts`

This stabilizes and const-stabilizes `<iN>::unbounded_shl` and `<uN>::unbounded_shr` from rust-lang#129375.
…hrisDenton

Windows: use existing wrappers in `File::open_native`

Just a small improvement I've noticed - prevents accidents regarding `SetFileInformationByHandle` parameters.

Probably ``@ChrisDenton`` since we talked about it on discord :)
…Noratrieb

Fix documentation for unstable sort on slice

Fixes rust-lang#136665
…hlin

Tighten `str-to-string-128690.rs``CHECK{,-NOT}`s to make it less likely to incorrectly fail with symbol name mangling

The `invoke` to match on to `CHECK` or `CHECK-NOT` (latest master) looks like

```llvm
  %_0.i.i.i.i.i.i.i.i.i.i.i.i.i1.i = invoke noundef zeroext i1 ``@"_ZN42_$LT$str$u20$as$u20$core..fmt..Display$GT$3fmt17ha18033e7fb4f14fcE"(ptr`` noalias noundef nonnull readonly align 1 %_3.val.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 noundef %_3.val1.i.i.i.i.i.i.i.i.i.i.i.i.i, ptr noalias noundef nonnull align 8 dereferenceable(64) %formatter.i)
          to label %bb1.i unwind label %cleanup.i, !noalias !80
```

in the local `.ll` output.

This test incorrectly failed in rust-lang#137483 (comment) due to

```
// CHECK-NOT: {{(call|invoke).*}}fmt
```

matching against the unrelated call

```llvm
tail call void ``@_RNvNtCseLfmtnDCoTB_5alloc7raw_vec12handle_error``
```

It's not pretty by any means, but...

r? ``@saethlin``
…ble-control-flow-into-value, r=jhpratt

Added into_value function to ControlFlow<T, T>
…, r=compiler-errors

Move `impl` blocks out of `rustc_middle/src/mir/syntax.rs`

Best reviewed one commit at a time.
…r, r=compiler-errors

Add a span to `CompilerBuiltinsCannotCall`

Currently, this error emit a diagnostic with no context like:

    error: `compiler_builtins` cannot call functions through upstream monomorphizations; encountered invalid call from `<math::libm::support::hex_float::Hexf<i32> as core::fmt::LowerHex>::fmt` to `core::fmt::num::<impl core::fmt::LowerHex for i32>::fmt`

With this change, it at least usually points to the problematic function:

    error: `compiler_builtins` cannot call functions through upstream monomorphizations; encountered invalid call from `<math::libm::support::hex_float::Hexf<i32> as core::fmt::LowerHex>::fmt` to `core::fmt::num::<impl core::fmt::LowerHex for i32>::fmt`
       --> src/../libm/src/math/support/hex_float.rs:270:5
        |
    270 |     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
@rustbot rustbot added O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 24, 2025
@rustbot 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels Feb 24, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Feb 24, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Feb 24, 2025

📌 Commit 42014b4 has been approved by jhpratt

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 24, 2025
@bors
Copy link
Collaborator

bors commented Feb 24, 2025

⌛ Testing commit 42014b4 with merge bb029a1...

@bors
Copy link
Collaborator

bors commented Feb 24, 2025

☀️ Test successful - checks-actions
Approved by: jhpratt
Pushing bb029a1 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 24, 2025
@bors bors merged commit bb029a1 into rust-lang:master Feb 24, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 24, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#136610 Allow IndexSlice to be indexed by ranges. 8ee3dfa2012d6f6fb509d17d9d839acd89eda3a4 (link)
#136991 [rustdoc] Add new setting to wrap source code lines when to… f3ba37a526d98bcf97f7515da5880d65f799df8c (link)
#137061 Unstable gen_future Feature Tracking 4de6256cfcab652396bd4c01612fb1a8009de94d (link)
#137393 Stabilize unbounded_shifts b4cfbc24cf9c010358e5f34e4e7b32dbe12ee4e7 (link)
#137482 Windows: use existing wrappers in File::open_native 6af662ef077a51d3f1911e371c17aa38148fa25e (link)
#137484 Fix documentation for unstable sort on slice 90b0c4cfce703ab8f32e373d03157fa810b7efcc (link)
#137491 Tighten str-to-string-128690.rs``CHECK{,-NOT}s to make it… 3ca63c6605c791b31621361e7124c73a8c7ac0ce (link)
#137495 Added into_value function to ControlFlow<T, T> cec9c57e470b56ee463e468c22d61d4a328a51e4 (link)
#137501 Move impl blocks out of rustc_middle/src/mir/syntax.rs 8216b996ce2dc0be14f9feb8bb77e12d44348251 (link)
#137505 Add a span to CompilerBuiltinsCannotCall 60f35d98c6e014801564cd87965be4cfcc047d56 (link)

previous master: f43e549b88

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bb029a1): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -1.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.0% [-1.0%, -1.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.0% [-1.0%, -1.0%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: missing data
Artifact size: 359.65 MiB -> 359.63 MiB (-0.00%)

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bb029a1): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results (secondary 2.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.5% [2.4%, 2.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 770.825s -> 769.375s (-0.19%)
Artifact size: 359.65 MiB -> 359.63 MiB (-0.00%)

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. O-windows Operating system: Windows 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.