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

Assert that ADTs have the right number of args #123214

Merged
merged 3 commits into from Mar 30, 2024

Conversation

compiler-errors
Copy link
Member

We're doing it for many other types, let's also do ADTs 😇

@rustbot
Copy link
Collaborator

rustbot commented Mar 30, 2024

r? @estebank

rustbot has assigned @estebank.
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 30, 2024
@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

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

Doesn't this have to account for Type { has_default: true, .. }? Either way, this seems reasonable but will require cleaning up the existing issues before it can land.

@compiler-errors
Copy link
Member Author

Doesn't this have to account for Type { has_default: true, .. }?

No, default type parameters have been expanded already. The only bug I can find (the one triggering those failures) is because we explicitly create an Adt with no substs in coherence for some reason. I'm ui-testing the fix right now.

@@ -296,15 +302,6 @@ fn emit_orphan_check_error<'tcx>(
};

ty = tcx.erase_regions(ty);
ty = match ty.kind() {
Copy link
Member

Choose a reason for hiding this comment

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

Ah lol, thanks :) I encountered this in #117164 and was a bit weirded out by it, glad it's gone.

Copy link
Member Author

Choose a reason for hiding this comment

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

💀

@estebank
Copy link
Contributor

r=me

@compiler-errors
Copy link
Member Author

@bors r=estebank

CI was green before I pushed the last commit, so I'll just approve this now.

@bors
Copy link
Contributor

bors commented Mar 30, 2024

📌 Commit f487d83 has been approved by estebank

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

bors commented Mar 30, 2024

⌛ Testing commit f487d83 with merge 40116ad...

@bors
Copy link
Contributor

bors commented Mar 30, 2024

☀️ Test successful - checks-actions
Approved by: estebank
Pushing 40116ad to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 30, 2024
@bors bors merged commit 40116ad into rust-lang:master Mar 30, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 30, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (40116ad): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.8% [0.8%, 0.8%] 2
Regressions ❌
(secondary)
0.6% [0.5%, 0.7%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [0.8%, 0.8%] 2

Max RSS (memory usage)

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

Cycles

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

Binary size

Results

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

Bootstrap: 669.392s -> 668.22s (-0.18%)
Artifact size: 315.78 MiB -> 315.77 MiB (-0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Mar 30, 2024
@compiler-errors
Copy link
Member Author

I only touched code on debug mode and on the error path 🤨

@Mark-Simulacrum
Copy link
Member

This looks within (recently higher likelihood) typical bimodality on these benchmarks. Marking as triaged.

@Mark-Simulacrum Mark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Apr 1, 2024
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. perf-regression-triaged The performance regression has been triaged. 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.

None yet

8 participants