Open
Conversation
There is a bunch of complexity supporting the "cannot check whether the hidden type of opaque type satisfies auto traits" error that shows up in `tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that shows up in a single test. If we are willing to downgrade that error message to a cycle error, we can do the following. - Simplify the `type_of_opaque` return value. - Remove the `cycle_stash` query modifier. - Remove the `CyclePlaceholder` type. - Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown` variant. - Remove a `FromCycleError` impl. - Remove `report_opaque_type_auto_trait_leakage`. - Remove the `StashKey::Cycle` variant. - Remove the `CycleErrorHandling::Stash` variant. That's a lot! I think this is a worthwhile trade-off.
Collaborator
|
|
Contributor
Author
|
cc @Zoxc @Zalathar @zetanumbers This overlaps with #153247, and implements the suggestion in this comment. Zoxc gave me the go ahead to take this over via Zulip DM. |
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.
There is a bunch of complexity supporting the "cannot check whether the hidden type of opaque type satisfies auto traits" error that shows up in
tests/ui/impl-trait/auto-trait-leak.rs. This is an obscure error that shows up in a single test. If we are willing to downgrade that error message to a cycle error, we can do the following.type_of_opaquereturn value.cycle_stashquery modifier.CyclePlaceholdertype.SelectionError::OpaqueTypeAutoTraitLeakageUnknownvariant.FromCycleErrorimpl.report_opaque_type_auto_trait_leakage.StashKey::Cyclevariant.CycleErrorHandling::Stashvariant.That's a lot! I think this is a worthwhile trade-off.
r? @oli-obk