You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
min_type_alias_impl_trait: poor diagnostics when TAIT is unconstrained #86733
changed the title [-]min_type_alias_impl_trait: poor diagnostics[/-][+]min_type_alias_impl_trait: poor diagnostics when TAIT is unconstrained[/+]on Jun 29, 2021
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.
Activity
[-]min_type_alias_impl_trait: poor diagnostics[/-][+]min_type_alias_impl_trait: poor diagnostics when TAIT is unconstrained[/+]voidc commentedon Jul 7, 2021
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.
oli-obk commentedon May 3, 2022
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.
dignifiedquire commentedon Jan 26, 2023
oli-obk commentedon Jan 26, 2023