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

Represent hir::TraitBoundModifiers as distinct parts in HIR #131982

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Oct 20, 2024

Stop squashing distinct polarity and constness into a single hir::TraitBoundModifier.

This PR doesn't attempt to handle all the corner cases correctly, since the old code certainly did not either; but it should be much easier for, e.g., rustc devs working on diagnostics, or clippy devs, to actually handle constness and polarity correctly.

try-job: x86_64-gnu-stable

@rustbot
Copy link
Collaborator

rustbot commented Oct 20, 2024

r? @GuillaumeGomez

rustbot has assigned @GuillaumeGomez.
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 A-rustdoc-json Area: Rustdoc JSON backend 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 Oct 20, 2024
@rustbot
Copy link
Collaborator

rustbot commented Oct 20, 2024

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

HIR ty lowering was modified

cc @fmease

@compiler-errors
Copy link
Member Author

compiler-errors commented Oct 20, 2024

Should probably be reviewed by someone on the compiler side, though feedback is obviously useful for the rustdoc and clippy sides.

r? compiler

compiler/rustc_ast_lowering/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_hir/src/hir.rs Outdated Show resolved Hide resolved
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Oct 21, 2024

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

Copy link
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

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

This is basically #119163 but now for HIR, so +1 from me.

r=me after rebase and nitpicks addressed

compiler/rustc_lint/src/traits.rs Show resolved Hide resolved
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@fmease
Copy link
Member

fmease commented Oct 21, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Oct 21, 2024

📌 Commit b6e4fca has been approved by fmease

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 Oct 21, 2024
@fmease fmease added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 21, 2024
@workingjubilee
Copy link
Member

Suspecting this based on #132018 (comment)

@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 22, 2024
@workingjubilee
Copy link
Member

@bors try

@bors
Copy link
Contributor

bors commented Oct 22, 2024

⌛ Trying commit b6e4fca with merge aa43197...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 22, 2024
…difiers, r=<try>

Represent `hir::TraitBoundModifiers` as distinct parts in HIR

Stop squashing distinct `polarity` and `constness` into a single `hir::TraitBoundModifier`.

This PR doesn't attempt to handle all the corner cases correctly, since the old code certainly did not either; but it should be much easier for, e.g., rustc devs working on diagnostics, or clippy devs, to actually handle constness and polarity correctly.

try-job: x86_64-gnu-stable
@fmease
Copy link
Member

fmease commented Oct 22, 2024

It's 100% this PR: The HIR stats for GenericBound have changed, need to be updated.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Oct 22, 2024

💔 Test failed - checks-actions

@rustbot rustbot added the A-rustdoc-json Area: Rustdoc JSON backend label Oct 22, 2024
@rustbot
Copy link
Collaborator

rustbot commented Oct 22, 2024

Changes to the size of AST and/or HIR nodes.

cc @nnethercote

@fmease
Copy link
Member

fmease commented Oct 22, 2024

While we're at it, let's maybe perf test the old try build (because GenericBound grew in size) (edit: not old, failing; I goofed)? idk, I should've done so yesterday already

[@] rust-timer build aa43197

@rust-timer

This comment has been minimized.

@fmease fmease closed this Oct 22, 2024
@fmease fmease reopened this Oct 22, 2024
@fmease
Copy link
Member

fmease commented Oct 22, 2024

Seems like rust-timer doesn't like old try builds (edit: not old, failing; I goofed).

Alrighty then, @bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Oct 22, 2024

📌 Commit febb3f7 has been approved by fmease

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 Oct 22, 2024
@bors
Copy link
Contributor

bors commented Oct 23, 2024

⌛ Testing commit febb3f7 with merge e1f3068...

@bors
Copy link
Contributor

bors commented Oct 23, 2024

☀️ Test successful - checks-actions
Approved by: fmease
Pushing e1f3068 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 23, 2024
@bors bors merged commit e1f3068 into rust-lang:master Oct 23, 2024
13 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Oct 23, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e1f3068): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -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.1% [0.1%, 0.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.1%, 0.1%] 1

Max RSS (memory usage)

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

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.0% [1.0%, 1.0%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.9% [-2.9%, -0.8%] 2
Improvements ✅
(secondary)
-0.7% [-0.7%, -0.7%] 1
All ❌✅ (primary) -0.4% [-2.9%, 1.0%] 4

Cycles

Results (secondary -3.8%)

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)
-3.8% [-3.8%, -3.8%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 780.01s -> 781.732s (0.22%)
Artifact size: 333.69 MiB -> 333.67 MiB (-0.01%)

@rust-timer
Copy link
Collaborator

Queued aa43197 with parent 814df6e, future comparison URL.
There is currently 1 preceding artifact in the queue.
It will probably take at least ~1.8 hours until the benchmark run finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend merged-by-bors This PR was explicitly merged by bors. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants