Skip to content

Conversation

@JonathanBrouwer
Copy link
Contributor

@JonathanBrouwer JonathanBrouwer commented Dec 30, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

nnethercote and others added 10 commits December 22, 2025 17:22
`freshen_{ty,const}` take a `Result` and just do a fold if the input is
`Ok`. It's simpler to do those folds at the call site, and only call
`freshen_{ty,const}` in the `Err` case. That way we can also avoid
useless fold operations on the results of `new_{int,uint,float}`.

Also, make some `bug!` calls more concise.
I have always found this confusingly named, because it creates a new
freshener rather than returning an existing one. We can remove it and
just use `TypeFreshener::new()` at the two call sites, avoiding this
confusion.
Sometimes we freshen using a new `TypeFreshener`, and sometimes we
freshen with an existing `TypeFreshener`. For the former we have the
method `InferCtxt::freshen`. For the latter we just call `fold_with`.
This asymmetry has been confusing to me.

This commit removes `InferCtxt::freshen` so that all the freshening
sites consistently use `fold_with` and it's obvious if each one is using
a new or existing `TypeFreshener`.
Because `fresh_trait_pred` is the name of the field/argument. The `_ref`
suffix appears to be a typo, or left over from earlier versions of the
code.
…-methods, r=lcnr

Simplify `TypeFreshener` methods.

`freshen_{ty,const}` take a `Result` and just do a fold if the input is `Ok`. It's simpler to do those folds at the call site, and only call `freshen_{ty,const}` in the `Err` case. That way we can also avoid useless fold operations on the results of `new_{int,uint,float}`.

Also, make some `bug!` calls more concise.

r? `@lcnr`
Cleanup linked list

 - Replaces some checked_sub().unwrap_or(0) with saturating_sub().
 - Replaces NonNull::from(Box::leak(node)) with Box::into_non_null(node)
@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-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Dec 30, 2025
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Dec 30, 2025

📌 Commit 596e1e3 has been approved by JonathanBrouwer

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 Dec 30, 2025
@bors
Copy link
Collaborator

bors commented Dec 30, 2025

⌛ Testing commit 596e1e3 with merge 15f7c55...

@bors
Copy link
Collaborator

bors commented Dec 30, 2025

☀️ Test successful - checks-actions
Approved by: JonathanBrouwer
Pushing 15f7c55 to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 30, 2025
@bors bors merged commit 15f7c55 into rust-lang:main Dec 30, 2025
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Dec 30, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#150239 Simplify TypeFreshener methods. 4e7b8ec7bf8d5881143c2d9c1c03b3bf757dae0b (link)
#150344 Cleanup linked list 4dda3ee8074ade3b951a872fc5f4df4d96ac4887 (link)

previous master: d465f99043

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

@github-actions
Copy link
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 d465f99 (parent) -> 15f7c55 (this PR)

Test differences

Show 34 test diffs

34 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 15f7c553a377bd027a0e2061695766c35c8600d1 --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-aarch64-apple: 7743.1s -> 6069.0s (-21.6%)
  2. aarch64-msvc-2: 5956.7s -> 6827.5s (+14.6%)
  3. tidy: 150.3s -> 170.6s (+13.5%)
  4. dist-arm-linux-musl: 5383.2s -> 5804.2s (+7.8%)
  5. dist-i686-mingw: 8955.1s -> 9620.2s (+7.4%)
  6. x86_64-gnu-llvm-21-3: 6322.0s -> 6761.2s (+6.9%)
  7. dist-x86_64-apple: 6961.9s -> 6561.8s (-5.7%)
  8. x86_64-mingw-1: 9718.8s -> 10200.6s (+5.0%)
  9. i686-msvc-2: 7798.8s -> 8176.1s (+4.8%)
  10. dist-s390x-linux: 4895.4s -> 5130.7s (+4.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
Collaborator

Finished benchmarking commit (15f7c55): 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)

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

Cycles

Results (primary 2.3%)

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

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

Binary size

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

Bootstrap: 482.641s -> 482.495s (-0.03%)
Artifact size: 390.82 MiB -> 390.85 MiB (0.01%)

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 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants