Skip to content

Do not report an excessive number of overflow errors for an ever-growing deref impl #130282

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 3 commits into from
Sep 16, 2024

Conversation

compiler-errors
Copy link
Member

Check that we don't first hit the recursion limit in get_field_candidates_considering_privacy before probing for methods when we have a method lookup failure and we want to see if .field.method() exists. We also silence overflow error messages if we're probing for methods for diagnostics.

Also renames some functions to make it clearer that they're only for diagnostics, and sprinkle some Autoderef::silence_errors around to silence unnecessary overflow errors that come from diagnostics.

Fixes #130224.

@rustbot
Copy link
Collaborator

rustbot commented Sep 12, 2024

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
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 Sep 12, 2024
@BoxyUwU
Copy link
Member

BoxyUwU commented Sep 16, 2024

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 16, 2024

📌 Commit 575c15a has been approved by BoxyUwU

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 Sep 16, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 16, 2024
…iaskrgr

Rollup of 3 pull requests

Successful merges:

 - rust-lang#130033 (Don't call `fn_arg_names` query for non-`fn` foreign items in resolver)
 - rust-lang#130282 (Do not report an excessive number of overflow errors for an ever-growing deref impl)
 - rust-lang#130437 (Avoid crashing on variadic functions when producing arg-mismatch errors)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 852e08e into rust-lang:master Sep 16, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 16, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 16, 2024
Rollup merge of rust-lang#130282 - compiler-errors:over-overflow, r=BoxyUwU

Do not report an excessive number of overflow errors for an ever-growing deref impl

Check that we don't first hit the recursion limit in `get_field_candidates_considering_privacy` before probing for methods when we have a method lookup failure and we want to see if `.field.method()` exists. We also silence overflow error messages if we're probing for methods for diagnostics.

Also renames some functions to make it clearer that they're only for diagnostics, and sprinkle some `Autoderef::silence_errors` around to silence unnecessary overflow errors that come from diagnostics.

Fixes rust-lang#130224.
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.

Infinite autoderef causes an infinite loop of reaching the recursion limit
4 participants