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

internal: Improve diagnostics performance #17078

Merged
merged 2 commits into from
Apr 15, 2024
Merged

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Apr 15, 2024

No description provided.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 15, 2024
@Veykril Veykril force-pushed the diags-perf branch 2 times, most recently from 502dbac to a35875f Compare April 15, 2024 20:07
Comment on lines +540 to +545
if let Pat::ConstBlock(expr) | Pat::Lit(expr) = *pat {
*has_type_mismatches |= infer.type_mismatch_for_expr(expr).is_some();
if *has_type_mismatches {
return;
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

The literal patterns don't have the mismatch associated with them, but contained expression within has. This fixes the bug call we had in one of the tests, so I replaced that with never! again.

@Veykril Veykril changed the title Diags perf internal: Improve diagnostics performance Apr 15, 2024
@Veykril
Copy link
Member Author

Veykril commented Apr 15, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 15, 2024

📌 Commit 531a270 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Apr 15, 2024

⌛ Testing commit 531a270 with merge 90cfa80...

@bors
Copy link
Collaborator

bors commented Apr 15, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 90cfa80 to master...

@bors bors merged commit 90cfa80 into rust-lang:master Apr 15, 2024
11 checks passed
@Veykril Veykril deleted the diags-perf branch April 15, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants