Stream: t-compiler/wg-nll

Topic: #53040 `FnMut` return ref to upvar


davidtwco (Oct 03 2018 at 23:58, on Zulip):

@nikomatsakis Submitted a WIP #54802. It does what we want (roughly) with the test case but it is affecting other errors and I'm not sure it's better for those.

davidtwco (Oct 03 2018 at 23:58, on Zulip):

cc @pnkfelix

nikomatsakis (Oct 04 2018 at 14:10, on Zulip):

@davidtwco cool :)

davidtwco (Oct 04 2018 at 19:40, on Zulip):

@nikomatsakis are you happy with returns a reference to a captured variable which escapes the closure body and returns a closure that contains a reference to a captured variable, therefore escaping the closure body as the error messages for the non-closure and closure case respectively?

nikomatsakis (Oct 04 2018 at 19:41, on Zulip):

I don't love "therefore" :)

nikomatsakis (Oct 04 2018 at 19:41, on Zulip):

it doesn't seem like the correct conjunction..

nikomatsakis (Oct 04 2018 at 19:41, on Zulip):

.."thereby" maybe but that's a bit over the top

davidtwco (Oct 04 2018 at 19:42, on Zulip):

"which then escapes the closure body"?

nikomatsakis (Oct 04 2018 at 19:42, on Zulip):

/me struggles

nikomatsakis (Oct 04 2018 at 19:42, on Zulip):

it's ambiguous then what is escaping

nikomatsakis (Oct 04 2018 at 19:42, on Zulip):

although in fact it doesn't matter

nikomatsakis (Oct 04 2018 at 19:42, on Zulip):

so maybe that's fine

nikomatsakis (Oct 04 2018 at 19:43, on Zulip):

let's go with that for now :)

davidtwco (Oct 04 2018 at 19:43, on Zulip):

:thumbs_up:

davidtwco (Oct 04 2018 at 19:54, on Zulip):

@nikomatsakis Pushed that.

pnkfelix (Oct 08 2018 at 15:08, on Zulip):

Hey @davidtwco I just made a quick note on something you may have overlooked in @nikomatsakis 's feeddback

pnkfelix (Oct 08 2018 at 15:08, on Zulip):

personally I'd be fine with r+'ing PR #54802 as is

pnkfelix (Oct 08 2018 at 15:08, on Zulip):

but if you think you'd be able to quickly incorporate the distinction between "inner closure" and "outer closure" when two closures are in play, then I'm happy to wait for that before r+'ing.

pnkfelix (Oct 08 2018 at 15:09, on Zulip):

Otherwise, I can just r+ and we can refine it further after it lands...

pnkfelix (Oct 08 2018 at 15:10, on Zulip):

(its also possible that the "inner closure" and "outer closure" distinction is actually unnecessary given the way that things are being phrased in the PR as is, which may be why i'm so inclined to r+ it as is...) :smile:

davidtwco (Oct 08 2018 at 15:18, on Zulip):

I think the current wording was intended to resolve the inner/outer closure comments.

davidtwco (Oct 08 2018 at 15:19, on Zulip):

But I’m not sure if there was any feedback on that wording.

davidtwco (Oct 08 2018 at 15:26, on Zulip):

If you think we could or should make an inner/outer distinction more clear in the wording then I’m happy to do so.

davidtwco (Oct 08 2018 at 21:18, on Zulip):

@nikomatsakis @pnkfelix if either of you could come up with wording that is preferred for this then I'll update the PR as soon as so we can get it landed :slight_smile:

pnkfelix (Oct 08 2018 at 21:18, on Zulip):

no I think its fine

Last update: Nov 21 2019 at 13:35UTC