-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Silence redundant cycle error #117235
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.
@bors r+ rollup |
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- |
Yea sorry. I didn't really pay too much attention. If we can silence the other cycle errors that would be best |
I'll check if silencing the earlier errors is possible in a good way. |
Try stashing the cycle errors if possible, then un-stashing them and canceling them in report_type_parameter_mismatch_cyclic_type_error. |
…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
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
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