Skip to content
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

Visitors track whether an assoc item is in a trait impl or an inherent impl #138929

Merged
merged 3 commits into from
Mar 25, 2025

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 25, 2025

AssocCtxt::Impl now contains an of_trait field. This allows ast lowering and nameres to not have to track whether we're in a trait impl or an inherent impl.

@rustbot
Copy link
Collaborator

rustbot commented Mar 25, 2025

r? @lcnr

rustbot has assigned @lcnr.
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 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 Mar 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 25, 2025

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 25, 2025

@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 Mar 25, 2025
@bors
Copy link
Collaborator

bors commented Mar 25, 2025

⌛ Trying commit 59e3380 with merge ffe0836...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 25, 2025
Track whether an assoc item is in a trait impl or an inherent impl

`AssocCtxt::Impl` now contains an `of_trait` field. This allows ast lowering and nameres to not have to track whether we're in a trait impl or an inherent impl.
@bors
Copy link
Collaborator

bors commented Mar 25, 2025

☀️ Try build successful - checks-actions
Build commit: ffe0836 (ffe08369643e179c00df5ea7746ef62fd5885129)

@rust-timer

This comment has been minimized.

@oli-obk oli-obk changed the title Track whether an assoc item is in a trait impl or an inherent impl Visitors track whether an assoc item is in a trait impl or an inherent impl Mar 25, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ffe0836): comparison URL.

Overall result: ✅ improvements - no action needed

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.

@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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.1%] 5
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

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.8% [0.8%, 0.8%] 1
Regressions ❌
(secondary)
2.9% [2.0%, 3.7%] 2
Improvements ✅
(primary)
-2.3% [-2.4%, -2.2%] 2
Improvements ✅
(secondary)
-2.7% [-2.8%, -2.6%] 3
All ❌✅ (primary) -1.3% [-2.4%, 0.8%] 3

Cycles

Results (secondary -5.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
Improvements ✅
(secondary)
-5.2% [-5.5%, -4.9%] 2
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 777.441s -> 778.223s (0.10%)
Artifact size: 365.81 MiB -> 365.84 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 25, 2025
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

yippee

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Mar 25, 2025

📌 Commit 59e3380 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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 25, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 25, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#135745 (Recognise new IPv6 non-global range from IETF RFC 9602)
 - rust-lang#137247 (cg_llvm: Reduce the visibility of types, modules and using declarations in `rustc_codegen_llvm`.)
 - rust-lang#138317 (privacy: Visit types and traits in impls in type privacy lints)
 - rust-lang#138581 (Abort in deadlock handler if we fail to get a query map)
 - rust-lang#138776 (coverage: Separate span-extraction from unexpansion)
 - rust-lang#138886 (Fix autofix for `self` and `self as …` in `unused_imports` lint)
 - rust-lang#138924 (Reduce `kw::Empty` usage, part 3)
 - rust-lang#138929 (Visitors track whether an assoc item is in a trait impl or an inherent impl)

r? `@ghost`
`@rustbot` modify labels: rollup
@lcnr
Copy link
Contributor

lcnr commented Mar 25, 2025

r? compiler-errors

@rustbot rustbot assigned compiler-errors and unassigned lcnr Mar 25, 2025
@bors bors merged commit 1107fc7 into rust-lang:master Mar 25, 2025
7 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 25, 2025
Rollup merge of rust-lang#138929 - oli-obk:assoc-ctxt-of-trait, r=compiler-errors

Visitors track whether an assoc item is in a trait impl or an inherent impl

`AssocCtxt::Impl` now contains an `of_trait` field. This allows ast lowering and nameres to not have to track whether we're in a trait impl or an inherent impl.
@rustbot rustbot added this to the 1.87.0 milestone Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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