Skip to content

Use default_field_values in Resolver #145398

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 1 commit into from
Aug 15, 2025

Conversation

estebank
Copy link
Contributor

Change Resolver to use feature(default_field_values). This change is non-exhaustive, as fields may have been added since I made this commit, and Fx(Index/Hash)(Map/Set) types would need to have a const constructable to change the majority of the fields left over.

Using default field values should make it easier to review when we add or remove fields to Resolver in the future, and highlight which fields are run-time dependent in Resolver::new.

r? @petrochenkov

@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. labels Aug 14, 2025
@petrochenkov
Copy link
Contributor

Thanks!
@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 14, 2025

📌 Commit eba1596 has been approved by petrochenkov

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 Aug 14, 2025
Kobzol added a commit to Kobzol/rust that referenced this pull request Aug 14, 2025
…er, r=petrochenkov

Use `default_field_values` in `Resolver`

Change `Resolver` to use `feature(default_field_values)`. This change is non-exhaustive, as fields may have been added since I made this commit, and `Fx(Index/Hash)(Map/Set)` types would need to have a `const` constructable to change the majority of the fields left over.

Using default field values should make it easier to review when we add or remove fields to `Resolver` in the future, and highlight which fields are run-time dependent in `Resolver::new`.

r? `@petrochenkov`
bors added a commit that referenced this pull request Aug 14, 2025
Rollup of 11 pull requests

Successful merges:

 - #137872 (Include whitespace in "remove |" suggestion and make it hidden)
 - #144631 (Fix test intrinsic-raw_eq-const-bad for big-endian)
 - #145233 (cfg_select: Support unbraced expressions)
 - #145261 (Improve tracing in bootstrap)
 - #145324 (Rename and document `ONLY_HOSTS` in bootstrap)
 - #145353 (bootstrap: Fix jemalloc 64K page support for aarch64 tools)
 - #145379 (bootstrap: Support passing `--timings` to cargo)
 - #145397 (Rust documentation, use `rustc-dev-guide` :3)
 - #145398 (Use `default_field_values` in `Resolver`)
 - #145401 (cleanup: Remove useless `[T].iter().last()`)
 - #145403 (Adjust error message grammar to be less awkward)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 93e895b into rust-lang:master Aug 15, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 15, 2025
rust-timer added a commit that referenced this pull request Aug 15, 2025
Rollup merge of #145398 - estebank:use-default-fields-resolver, r=petrochenkov

Use `default_field_values` in `Resolver`

Change `Resolver` to use `feature(default_field_values)`. This change is non-exhaustive, as fields may have been added since I made this commit, and `Fx(Index/Hash)(Map/Set)` types would need to have a `const` constructable to change the majority of the fields left over.

Using default field values should make it easier to review when we add or remove fields to `Resolver` in the future, and highlight which fields are run-time dependent in `Resolver::new`.

r? ``@petrochenkov``
@Kobzol
Copy link
Member

Kobzol commented Aug 15, 2025

@rust-timer build 14633ab

Testing for #145407.

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (14633ab): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
1.5% [1.5%, 1.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.2% [-3.1%, -1.3%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.0% [-3.1%, 1.5%] 3

Max RSS (memory usage)

Results (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)
0.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.6% [-3.6%, -3.6%] 1
All ❌✅ (primary) - - 0

Cycles

Results (primary -2.3%, secondary 3.6%)

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)
3.6% [2.2%, 6.5%] 4
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.3% [-2.3%, -2.3%] 1

Binary size

Results (primary -0.3%, secondary -0.0%)

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

mean range count
Regressions ❌
(primary)
0.1% [0.1%, 0.1%] 2
Regressions ❌
(secondary)
0.4% [0.1%, 0.7%] 2
Improvements ✅
(primary)
-0.4% [-0.6%, -0.3%] 4
Improvements ✅
(secondary)
-0.2% [-0.4%, -0.0%] 7
All ❌✅ (primary) -0.3% [-0.6%, 0.1%] 6

Bootstrap: 470.516s -> 471.565s (0.22%)
Artifact size: 377.36 MiB -> 377.35 MiB (-0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants