Closed
Conversation
`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.
Contributor
|
@bors r+ rollup |
Collaborator
Contributor
|
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- |
Contributor
|
Yea sorry. I didn't really pay too much attention. If we can silence the other cycle errors that would be best |
Contributor
Author
|
I'll check if silencing the earlier errors is possible in a good way. |
Contributor
|
Try stashing the cycle errors if possible, then un-stashing them and canceling them in report_type_parameter_mismatch_cyclic_type_error. |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SelectionError::OpaqueTypeAutoTraitLeakageUnknownoccurs when a prior cycle error has been emitted already. Silence the error and turn it into a delayed bug.CC #117233.
r? @oli-obk