Stream: t-compiler/wg-nll

Topic: wf of self type


nikomatsakis (Oct 23 2018 at 12:50, on Zulip):

So @Matthew Jasper, as suspected, proving the self-type is WF fixes issue-28848.rs, but the more I think about it, it feels like I'm not doing the check in the right place.

nikomatsakis (Oct 23 2018 at 12:50, on Zulip):

This feels like something we need to enforce for any projection, whether or not a user-supplied type annotation is given.

Matthew Jasper (Oct 23 2018 at 14:11, on Zulip):

Does A::f not record a user type?

nikomatsakis (Oct 23 2018 at 14:23, on Zulip):

presently it does

nikomatsakis (Oct 23 2018 at 14:23, on Zulip):

and so the type passes

nikomatsakis (Oct 23 2018 at 14:23, on Zulip):

but I don't think it should have to

nikomatsakis (Oct 23 2018 at 14:23, on Zulip):

in order for the test to fail

nikomatsakis (Oct 23 2018 at 14:23, on Zulip):

I am not going to try to solve this in this PR :)

nikomatsakis (Oct 23 2018 at 14:23, on Zulip):

I'll just add the test (that is, a variant of issue-28848 without explicit annotations)

nikomatsakis (Oct 23 2018 at 14:23, on Zulip):

and open an issue to refactor this

nikomatsakis (Oct 23 2018 at 14:23, on Zulip):

or..not :)

Last update: Nov 21 2019 at 14:00UTC