-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix "bivariant wf" bug in the NLL subtyping code #54105
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
…n-ascription, r=pnkfelix support ascription for patterns in NLL This implements the strategy outlined in [this comment](#47184 (comment)): - We first extend the NLL subtyping code so it can handle inference variables and subtyping. - Then we extend HAIR patterns with type ascription. - Then we treat the type `T` in `let pat: T = ...` as an ascription. Before landing, a few things: - [x] Fix the WF rule bug (filed a FIXME #54105) - [x] Fix an ICE I encountered locally around bound regions, or else file a follow-up - [x] More tests probably =) r? @pnkfelix
assigning self to this to try to help offload work from @nikomatsakis |
I have yet to come up with a way to exercise this bug. I tried e.g. this example but we do catch it. |
I'm demoting this to Release. I still think there is probably a bug here but since we don't even know how to reproduce it, it doesn't seem like an RC2 blocker. |
Tagging as A-traits too because @scalexm is expanding this code as part of their work on the trait system unification code, and we may wind up fixing it then. Still need to come up with a test case. Removing from the Rust 2018 milestone. |
NLL triage. This needs prioritization. I'm inclined to go with P-medium. |
nominating for discussion at NLL meeting tonight. Namely, I'm seeking a volunteer to look for a test case. |
removing I-nominated tag. We discussed briefly at the NLL meeting but I think I didn't make the bait here attractive enough. |
NLL-triage. Marking P-medium. |
#53873 generalized the NLL subtyping code to handle subtyping and the like, but I think it is vulnerable to a similar flaw as the one from #41677. I didn't want to block that PR so I am filing this issue to follow-up.
The text was updated successfully, but these errors were encountered: