-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Wrong diagnostic when using constant of TAIT type in pattern #102011
Comments
i do think we should experiment with adding the too generic type to |
Triage note: I was going to add one or more of the |
Oof, yea, sorry about that. I added some explanation including what should actually be done. |
my idea was pub enum ErrorHandled<'tcx> {
Reported(ErrorGuaranteed),
Linted,
TooGeneric(Ty<'tcx>),
}
this should give us pretty good error messages with a hopefully acceptable perf impact |
This no longer reports the same error as the issue, and instead just says:
|
Triage: Since we already have a test as |
The test src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs (copied below to preserve its state)
reports an error about "depends on a generic parameter", when there are no generic parameters anywhere. The issue is that we only have a single
TooGeneric
variant in https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/interpret/enum.ErrorHandled.html#variant.TooGeneric . We should change that fieldless variant toTooGeneric(TooGeneric)
and introduce anOriginally posted by @lcnr in #101478 (comment)
The text was updated successfully, but these errors were encountered: