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

Silence redundant cycle error #117235

Closed
wants to merge 1 commit into from

Conversation

estebank
Copy link
Contributor

SelectionError::OpaqueTypeAutoTraitLeakageUnknown occurs when a prior cycle error has been emitted already. Silence the error and turn it into a delayed bug.

CC #117233.

r? @oli-obk

`SelectionError::OpaqueTypeAutoTraitLeakageUnknown` occurs when a prior
cycle error has been emitted already. Silence the error and turn it into
a delayed bug.

CC rust-lang#117233.
@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 Oct 26, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Oct 26, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 26, 2023

📌 Commit 14af289 has been approved by oli-obk

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 26, 2023
@compiler-errors
Copy link
Member

Doesn't this totally undo the improvements to cycle errors that were introduced by #113320?

I think this PR should be trying to suppress the less-specific cycle errors in favor of the selection error, which actually explains what auto trait is the cause of the cycle.

Either that, or #113320 needs to be reverted in its entirety.

@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 26, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Oct 26, 2023

Yea sorry. I didn't really pay too much attention. If we can silence the other cycle errors that would be best

@estebank
Copy link
Contributor Author

I'll check if silencing the earlier errors is possible in a good way.

@compiler-errors
Copy link
Member

compiler-errors commented Oct 26, 2023

Try stashing the cycle errors if possible, then un-stashing them and canceling them in report_type_parameter_mismatch_cyclic_type_error.

@estebank estebank closed this Oct 26, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 27, 2023
…cle, r=oli-obk

Stash and cancel cycle errors for auto trait leakage in opaques

We don't need to emit a traditional cycle error when we have a selection error that explains what's going on but in more detail.

We may want to augment this error to actually point out the cycle, now that the cycle error is not being emitted. We could do that by storing the set of opaques that was in the `CyclePlaceholder` that gets returned from `type_of_opaque`.

r? `@oli-obk` cc `@estebank` rust-lang#117235
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 27, 2023
Rollup merge of rust-lang#117241 - compiler-errors:auto-trait-leak-cycle, r=oli-obk

Stash and cancel cycle errors for auto trait leakage in opaques

We don't need to emit a traditional cycle error when we have a selection error that explains what's going on but in more detail.

We may want to augment this error to actually point out the cycle, now that the cycle error is not being emitted. We could do that by storing the set of opaques that was in the `CyclePlaceholder` that gets returned from `type_of_opaque`.

r? `@oli-obk` cc `@estebank` rust-lang#117235
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

5 participants