Stream: t-compiler/wg-nll

Topic: #55394 elided lifetime ICE

davidtwco (Nov 09 2018 at 14:43, on Zulip):

Submitted #55822.

pnkfelix (Nov 09 2018 at 16:08, on Zulip):

so @davidtwco I did just r+ this, and I think its definitely an improvement over what we had

pnkfelix (Nov 09 2018 at 16:09, on Zulip):

but reading over the PR now ... am I correct that the PR handles all of {closure,generator,method} ... but does not handle top level functions (i.e. fn foo(arg: &This) -> That<'_> { ... }, or something along those lines...)

pnkfelix (Nov 09 2018 at 16:09, on Zulip):

(it also might be good to see how it handles a default method defined in a trait.)

pnkfelix (Nov 09 2018 at 16:10, on Zulip):

These are mostly cases where I might want to see some more tests, though. I don't know whether they would end up leading to actual bugs being exposed.

pnkfelix (Nov 09 2018 at 16:12, on Zulip):

(or maybe I've misunderstood the circumstances surrounding this particular bug...)

davidtwco (Nov 09 2018 at 16:59, on Zulip):

I've messed around a little with top-level functions like that to see if I could make it go down the fallback branch but couldn't. I think this function handles closures/generators 99% of the time which is why this ICE wasn't discovered earlier and why the else branch originally had a // unreachable? comment. The impl X<'_> and fn foo(x: &Y) -> Self combination is a rare case that would go down this branch.

davidtwco (Nov 09 2018 at 17:00, on Zulip):

Worst case now is that the span for the return type is wrong rather than an ICE if there is some case I've not thought of (which isn't unlikely).

Last update: Jul 02 2020 at 13:30UTC