Rollup of 3 pull requests#155029
Conversation
This moves the inherent `get_mut` method to be `AsMut::as_mut`, and renames `get_pin_mut` to `as_pin_mut` accordingly. It also constifies the `AsRef` (and `AsMut`) implementations, preserving the `const` status of the original `get_mut`, albeit only unstably.
This completes the existing suite of `as_ref`, `as_mut`, and `as_pin_mut` methods.
`rustc_middle` is enormous and it's always good to move things out of it where possible. `maybe_loop_headers` is easy to move because it has a single use in `jump_threading.rs`.
…Amanieu core::sync: rename `Exclusive` to `SyncView` and make improvements This PR implements the renaming of `core::sync::Exclusive` to `SyncView` as decided in rust-lang#98407. To preserve the ability to search for the old name, it adds `Exclusive` as a `doc_alias`. It also makes the following additional changes: - Converting the `get_mut` method to being an instance of `AsMut::as_mut`. In the process, it makes both the new `impl AsMut` and the existing `impl AsRef` `const`, and it also renames `get_pin_mut` to `as_pin_mut` for consistency. This direction follows a suggestion from rust-lang#98407. - Adding an `as_pin` method that can only be used when the wrapped type implements `Sync`, to complete the square of access methods. - Making as many of the existing `impl`s `const` as possible; this involved making the existing `impl Default` no longer derived. - Adding `impl`s for `AsyncFnOnce`, `AsyncFnMut`, and `AsyncFn`, akin to the existing `impls` for `FnOnce`, `FnMut`, and `Fn`. It does not yet do the following, which may be desirable: - Fixing/improving the documentation to address the concern pointed out in rust-lang#146245. It previously did the following, but this was removed after discussion: - Adding an `impl` for (`const`) `Iterator`, which felt in line with the existing `impl`s for `Future` and `Coroutine`.
…e-implementors, r=notriddle Fix pattern types rendering in rustdoc Closes rust-lang#150889 . `core` was rendering local pattern-type impls through `clean_ty`, which formatted `rustc_hir::TyPat` with derived Debug, while inlined docs go through `clean_middle_ty` and get the pretty-printed `rustc_middle::ty::Pattern`. Lower local HIR pattern types before formatting so both paths share the same canonical pattern printer and stop exposing `TyPat { ... }` in implementors. #### Current result: <img width="1133" height="738" alt="截屏2026-04-07 22 47 26" src="https://github.com/user-attachments/assets/bb5f8942-30b1-400a-a0a0-f581da5bb59f" />
… r=dianqk Move `maybe_loop_headers` out of `rustc_middle`. `rustc_middle` is enormous and it's always good to move things out of it where possible. `maybe_loop_headers` is easy to move because it has a single use in `jump_threading.rs`. r? @WaffleLapkin
|
@bors r+ rollup=never p=5 |
This comment has been minimized.
This comment has been minimized.
|
📌 Perf builds for each rolled up PR:
previous master: 1fe72d3599 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 1fe72d3 (parent) -> 1948ee1 (this PR) Test differencesShow 32 test diffsStage 1
Stage 2
Additionally, 30 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 1948ee19e95ef7835624c591eef11a8838b66ec7 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (1948ee1): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (secondary 0.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.0%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 490.69s -> 490.984s (0.06%) |
Successful merges:
ExclusivetoSyncViewand make improvements #153038 (core::sync: renameExclusivetoSyncViewand make improvements)maybe_loop_headersout ofrustc_middle. #155026 (Movemaybe_loop_headersout ofrustc_middle.)r? @ghost
Create a similar rollup