Stream: t-compiler/wg-polonius

Topic: loans in scope


lqd (Aug 03 2020 at 15:59, on Zulip):

@nikomatsakis you mentioned before you wanted polonius to basically compute all loans in scope for all origins, and I wondered about that, did we absolutely need all loans for a reason that I didn't know yet (I was wondering whether that would be needed for diagnostics for example). I was looking for ways to avoid materializing and propagating loans if possible, or at least delaying them or computing them lazily for as long as we could until we knew for sure that there was an error. (I do realize that right now propagating loans is how we detect errors, and would require an alternative way of doing so)

nikomatsakis (Aug 03 2020 at 16:11, on Zulip):

@lqd I don't recall expressing an opinion about this ...

nikomatsakis (Aug 03 2020 at 16:12, on Zulip):

off the top of my head I can't see why we need to compute all loans in scope for all origins

nikomatsakis (Aug 03 2020 at 16:12, on Zulip):

and if we did need it for diagnostics, which I don't think we do, I imagine we could compute it on demand

lqd (Aug 03 2020 at 16:17, on Zulip):

I mean we currently eagerly compute all loans contained at every point in the cfg (with some possible filtering wrt "all origins") but couldn't see a reason that we absolutely had to and wanted to make sure I wasn't missing something :)

nikomatsakis (Aug 03 2020 at 16:17, on Zulip):

nope, I think I always expected us to use feedback to limit that

lqd (Aug 03 2020 at 16:18, on Zulip):

nice, thank you :)

Last update: Jun 20 2021 at 00:15UTC