-
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
min_type_alias_impl_trait: poor diagnostics when TAIT is unconstrained #86733
Comments
I'd be interested in taking a stab at this. However, I'm not quite sure what the desired behavior is. I looked at PR #66431 which implemented the fallback to a non-defining use for unconstrained opaque types. One possibility would be to somewhere store every location at which such a fallback occurs, to later show a warning/note when no other defining use is found. I would also appreciate some mentoring instructions on how to approach this. |
Yea, I think the only way to fix this is to add a new field to https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.BorrowCheckResult.html that maps from opaque type def ids to spans and use that when reporting the unconstrained diagnostic. |
The minimized example (playground:
gives what appears to me to be the correct error:
but the diagnostics are not very good.
Originally posted by @nikomatsakis in #66426 (comment)
The text was updated successfully, but these errors were encountered: