Skip to content

Remove Symbol from Named variant of BoundRegionKind/LateParamRegionKind #139598

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 5 commits into from
Jul 5, 2025

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Apr 9, 2025

The Symbol is redundant, since we already store a DefId in the region variant. Instead, load the name via item_name when needed (which is almost always on the diagnostic path).

This introduces a BoundRegionKind::NamedAnon which is used for giving anonymous bound regions names, but which should only be used during pretty printing and error reporting.

@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. labels Apr 9, 2025
@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 9, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 9, 2025
… r=<try>

Remove `Symbol` from `Named` variant of `BoundRegionKind`/`LateParamRegionKind`

r? `@ghost`
@bors
Copy link
Collaborator

bors commented Apr 9, 2025

⌛ Trying commit dba712a with merge 098a24f...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Apr 9, 2025

☀️ Try build successful - checks-actions
Build commit: 098a24f (098a24f333aac968a2fcbf1e3d152550224ea44d)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (098a24f): comparison URL.

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

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +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.2% [0.1%, 0.3%] 4
Regressions ❌
(secondary)
0.3% [0.2%, 0.4%] 12
Improvements ✅
(primary)
-0.2% [-0.5%, -0.1%] 54
Improvements ✅
(secondary)
-0.3% [-0.6%, -0.1%] 37
All ❌✅ (primary) -0.2% [-0.5%, 0.3%] 58

Max RSS (memory usage)

Results (primary -0.4%, secondary -0.4%)

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)
2.2% [0.9%, 3.5%] 2
Regressions ❌
(secondary)
3.4% [1.8%, 4.6%] 3
Improvements ✅
(primary)
-2.1% [-2.6%, -1.5%] 3
Improvements ✅
(secondary)
-3.3% [-3.9%, -2.1%] 4
All ❌✅ (primary) -0.4% [-2.6%, 3.5%] 5

Cycles

Results (primary 0.6%, secondary 1.4%)

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)
1.3% [1.0%, 1.6%] 3
Regressions ❌
(secondary)
1.4% [1.4%, 1.4%] 1
Improvements ✅
(primary)
-1.4% [-1.4%, -1.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [-1.4%, 1.6%] 4

Binary size

Results (primary -0.1%, secondary -0.2%)

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)
-0.1% [-0.3%, -0.0%] 118
Improvements ✅
(secondary)
-0.2% [-0.8%, -0.0%] 33
All ❌✅ (primary) -0.1% [-0.3%, -0.0%] 118

Bootstrap: 780.203s -> 780.55s (0.04%)
Artifact size: 366.14 MiB -> 366.17 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Apr 10, 2025
@rustbot rustbot added the WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) label Apr 11, 2025
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 6, 2025

☔ The latest upstream changes (presumably #140682) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member Author

This is ready to review I think.

@compiler-errors compiler-errors marked this pull request as ready for review June 25, 2025 17:56
@rustbot
Copy link
Collaborator

rustbot commented Jun 25, 2025

r? @WaffleLapkin

rustbot has assigned @WaffleLapkin.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented Jun 25, 2025

HIR ty lowering was modified

cc @fmease

@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member Author

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 25, 2025
@bors
Copy link
Collaborator

bors commented Jun 27, 2025

☔ The latest upstream changes (presumably #143057) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member Author

naur

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 27, 2025
@bors
Copy link
Collaborator

bors commented Jun 27, 2025

☔ The latest upstream changes (presumably #143091) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Member

@WaffleLapkin WaffleLapkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with/out nits

@WaffleLapkin WaffleLapkin added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 2, 2025
@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member Author

@bors r+ p=1 (bitrotty)

@bors
Copy link
Collaborator

bors commented Jul 5, 2025

📌 Commit dc8cac8 has been approved by compiler-errors

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 5, 2025
@compiler-errors
Copy link
Member Author

oops

@bors r=WaffleLapkin

@bors
Copy link
Collaborator

bors commented Jul 5, 2025

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Collaborator

bors commented Jul 5, 2025

📌 Commit dc8cac8 has been approved by WaffleLapkin

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jul 5, 2025

⌛ Testing commit dc8cac8 with merge f0b67dd...

@bors
Copy link
Collaborator

bors commented Jul 5, 2025

☀️ Test successful - checks-actions
Approved by: WaffleLapkin
Pushing f0b67dd to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 5, 2025
@bors bors merged commit f0b67dd into rust-lang:master Jul 5, 2025
12 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 5, 2025
Copy link
Contributor

github-actions bot commented Jul 5, 2025

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 733b47e (parent) -> f0b67dd (this PR)

Test differences

Show 6 test diffs

6 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 f0b67dd97d74610ee4185cf01c775a563c2017a2 --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-linux: 5753.6s -> 8475.1s (47.3%)
  2. x86_64-apple-1: 9878.0s -> 6584.6s (-33.3%)
  3. aarch64-apple: 4637.2s -> 5254.6s (13.3%)
  4. dist-x86_64-apple: 8273.4s -> 7246.5s (-12.4%)
  5. x86_64-apple-2: 5589.6s -> 4942.2s (-11.6%)
  6. dist-aarch64-apple: 5354.4s -> 4806.6s (-10.2%)
  7. dist-sparcv9-solaris: 4750.3s -> 5049.8s (6.3%)
  8. x86_64-gnu-tools: 3776.3s -> 3562.3s (-5.7%)
  9. dist-loongarch64-linux: 5995.4s -> 5685.2s (-5.2%)
  10. test-various: 4914.0s -> 4684.9s (-4.7%)
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 (f0b67dd): comparison URL.

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

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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)
0.5% [0.1%, 3.2%] 13
Regressions ❌
(secondary)
0.4% [0.1%, 0.6%] 23
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.5%, -0.1%] 7
All ❌✅ (primary) 0.5% [0.1%, 3.2%] 13

Max RSS (memory usage)

Results (primary 0.9%, secondary 2.0%)

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

mean range count
Regressions ❌
(primary)
2.9% [2.3%, 3.8%] 3
Regressions ❌
(secondary)
4.0% [2.7%, 5.0%] 4
Improvements ✅
(primary)
-2.0% [-2.3%, -1.8%] 2
Improvements ✅
(secondary)
-1.8% [-1.8%, -1.7%] 2
All ❌✅ (primary) 0.9% [-2.3%, 3.8%] 5

Cycles

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

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.2% [0.5%, 3.5%] 3
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
-3.3% [-5.4%, -0.5%] 3
All ❌✅ (primary) -2.4% [-2.4%, -2.4%] 1

Binary size

Results (primary -0.1%, secondary -0.2%)

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

mean range count
Regressions ❌
(primary)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.3%, -0.0%] 96
Improvements ✅
(secondary)
-0.2% [-0.8%, -0.0%] 50
All ❌✅ (primary) -0.1% [-0.3%, 1.1%] 97

Bootstrap: 461.743s -> 460.935s (-0.17%)
Artifact size: 372.21 MiB -> 372.19 MiB (-0.01%)

@compiler-errors
Copy link
Member Author

The clap derive regression looks unrelated b/c it seems to be bimodal +/-3%.

Rest of the regressions are 🤷, kind of a shame that this ended up not actually benefitting perf, but I don't know what changed in this PR's impl that would have nullified the previous results.

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. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants