Skip to content

Rollup of 3 pull requests - #163783

Merged
rust-bors[bot] merged 14 commits into
rust-lang:mainfrom
jhpratt:rollup-62okXgs
Oct 5, 2026
Merged

rust-bors[bot] merged 14 commits into
rust-lang:mainfrom
jhpratt:rollup-62okXgs

Conversation

@jhpratt

@jhpratt jhpratt commented Oct 5, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

nnethercote and others added 14 commits September 30, 2026 16:27
It has a single call site, where it can be replaced with
`insert_value_idx` because `flood_discr` and `find_discr` are already
done.
It's basically the same as `Option::and_then`.
`handle_assign` handles several `Rvalue` variants, and then falls
through to the only call site of `handle_rvalue`, which handles all the
`Rvalue` variants. The `Use`, `CopyForDeref`, and `Aggregate` arms in
`handle_rvalue` are unreachable because those variants are fully handled
by `handle_assign`

This commit just inlines and removes `handle_rvalue`, which makes the
control flow simpler and avoids the unreachable arms.
These all have a single call site and are tiny or small, and several are
called from methods that are also tiny. (Too many small methods just
spreads things out unnecessarily.) The only remaining `handle_*` methods
are `handle_assign`, which is large, and `handle_operand`, which has
multiple call sites.
…-root-path, r=notriddle,GuillaumeGomez

Fix relative extern URL depth on source pages

Source pages with `--extern-html-root-url` pointing to a relative URL like `../` were generating links with one extra `../`. So instead of `../../core/iter/index.html` you'd get `../../../core/iter/index.html`. Took a while to notice because `htmldocck.py` uses substring matching — `../../core/` is a substring of `../../../core/` so the test passed anyway.

Two root causes. `remote_url_prefix` was using `cx.current.len()` for depth, but during source rendering `cx.current` is empty — `SourceCollector` doesn't do module descent. Source pages live under `src/<crate_name>/` so the real depth is 2, not 0. On top of that, `make_href` was trying to compensate by prepending `root_path` to relative remote URLs (there was a FIXME about this), which just made it worse — `../../` + `../core/iter/` = `../../../core/iter/`.

Fix: added `remote_item_depth(root_path, doc_depth)` that counts `../` segments in `root_path` when present, falls back to `doc_depth` otherwise. With the right depth in `remote_url_prefix`, `make_href` no longer needs to touch remote URLs at all — so `url_parts` now returns `is_remote = true` for all `Remote` locations. Also renamed `is_absolute` → `is_remote` since the semantics were always about "don't modify this URL", not about whether it has a scheme.

Added `!has` assertions to the test so the wrong URL gets caught explicitly next time.

Follow-up to rust-lang#152977.

r? @notriddle
Const analysis cleanups

Details in individual commits.

r? @saethlin
…loop, r=saethlin

Use a loop to avoid emitting long sequences of retags.

See MCP [rust-lang#958](rust-lang/compiler-team#958) for context on `-Zcodegen-emit-retag`.

If we need to retag an array of references, then we will retag every element of the array. This does not scale for large arrays. For example:
```rust
const N: usize = 100_000;

fn example(array: [&u32; N]) {}

fn main() {
    example([&0; N]);
}
```
This program will cause `rustc` to hang at `-O0` with `-Zcodegen-emit-retag`. In the body of `example`, we need to ensure that every element of `array` receives a function-entry retag, so we emit 100,000 retag function calls within a single basic block!

This PR fixes this issue by adjusting how we retag the contents of arrays. Instead of retagging ever element in succession, we emit a loop that applies a single retag call to every element of the array. I have tested it on BorrowSanitizer's test suite.

Also, I saw the new `#FIXME` comment about supporting `repr(simd)` types. Some of the changes that I made here will be helpful for fixing that issue in a subsequent PR.

cc: @mojeanmac
r? @saethlin
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Oct 5, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler 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. labels Oct 5, 2026
@jhpratt

jhpratt commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 447d1ef has been approved by jhpratt

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Oct 5, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 5, 2026
@rust-bors

rust-bors Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 5m 43s
Pushing 4d13b68 to main...

@rust-bors
rust-bors Bot merged commit 4d13b68 into rust-lang:main Oct 5, 2026
15 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor
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 cc9a14f (parent) -> 4d13b68 (this PR)

Test differences

Show 4 test diffs

4 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 4d13b68badbf76e5c7831291e8fb324eabae2626 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-loongarch64-linux: 1h 17m -> 2h 7m (+65.2%)
  2. test-x86_64-gnu-miri: 54m 56s -> 1h 26m (+57.6%)
  3. test-i686-gnu-1: 1h 31m -> 2h 20m (+52.4%)
  4. dist-powerpc64le-linux-gnu: 1h 7m -> 1h 41m (+49.1%)
  5. test-x86_64-gnu-debug: 2h 10m -> 1h 15m (-42.1%)
  6. test-i686-msvc: 1h 53m -> 2h 38m (+39.8%)
  7. dist-loongarch64-musl: 2h 3m -> 1h 16m (-38.4%)
  8. test-x86_64-gnu-next-trait-solver-polonius: 41m 48s -> 57m 32s (+37.6%)
  9. test-x86_64-msvc-ext2: 1h 24m -> 1h 55m (+36.9%)
  10. test-x86_64-gnu-stdlib-semver-check: 17m 34s -> 11m 17s (-35.8%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (4d13b68): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

Results (primary -2.4%, secondary -1.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.8% [2.8%, 2.8%] 1
Improvements ✅
(primary)
-2.4% [-2.6%, -2.2%] 3
Improvements ✅
(secondary)
-2.7% [-3.4%, -2.1%] 3
All ❌✅ (primary) -2.4% [-2.6%, -2.2%] 3

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 489.361s -> 488.486s (-0.18%)
Artifact size: 408.63 MiB -> 408.62 MiB (-0.00%)

@rust-bors

rust-bors Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#153160 Fix relative extern URL depth on source pages 7ad89800891248c04f3e9e6d42f35e1bb5879f68
(link)
#163529 Const analysis cleanups eb77373ec2e9307f663b324ece4b85f2c666021b
(link)
#163567 Use a loop to avoid emitting long sequences of retags. fd270a4414d01bc19e9a73184746d9ae229e1a6a
(link)

parent commit: cc9a14f721

In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: @rust-timer triage $SHA $SHA $SHA..., or run @rust-timer triage all to benchmark all rollup members.

@jhpratt
jhpratt deleted the rollup-62okXgs branch October 6, 2026 05:38
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. rollup A PR which is a rollup T-compiler Relevant to the compiler 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.

6 participants