Uh oh!
There was an error while loading. Please reload this page.
Implement impl Trait lifetime elision - #46616
Conversation
There was a problem hiding this comment.
There's a bit of duplicated code here, but I couldn't figure out a good way to factor it out-- it seems too little code for its own function, but a closure would have a signature like for<'a, 'tcx> Fn(&mut LifetimeContext<'a, 'tcx>, &'tcx Generics) and I don't believe there's a way to write that ATM (though I could be wrong)
nikomatsakis
left a comment
There was a problem hiding this comment.
I'm not sure what's the ICE, will investigate.
There was a problem hiding this comment.
I think we have to save and restore the flag; what about Fn(dyn Fn(&u32)) or something?
There was a problem hiding this comment.
This should be equivalent to collecting and restoring it-- note that this if branch is only entered if collect_elided_lifetimes starts out as true, so the logic is: "if true, set to false, run thing then set to true, else, run thing (equivalent to set to false, run thing, set to false)". I'm happy to change it if you think it's too confusing (or if I'm mistaken and my logic is actually incorrect).
There was a problem hiding this comment.
As above-- the collect_elided_lifetimes in the if check should prevent us from needing to split it out, but I think it's unnecessarily "clever", so I'll change it.
54cab78 to
6c3cab9Comparebors
commented
Dec 12, 2017
☔ The latest upstream changes (presumably #46657) made this pull request unmergeable. Please resolve the merge conflicts. |
6c3cab9 to
be7270fCompareThere was a problem hiding this comment.
This ICE is #46685, and is unrelated to this PR.
be7270f to
018c403Comparenikomatsakis
commented
Dec 12, 2017
@bors r+ |
bors
commented
Dec 12, 2017
📌 Commit 018c403 has been approved by |
bors
commented
Dec 12, 2017
⌛ Testing commit 018c403 with merge 40bd2cbc492d3a009333301e70d27870c46b910f... |
kennytm
commented
Dec 12, 2017
@bors retry — Prioritizing rollup (no PRs will pass before #46694 is merged or travis-ci/travis-ci#8891 is fixed). |
kennytm
commented
Dec 12, 2017
@bors rollup- 😑 |
bors
commented
Dec 13, 2017
Implement impl Trait lifetime elision Fixes#43396. There's one weird ICE in the interaction with argument-position `impl Trait`. I'm still debugging it-- I've left a test for it commented out with a FIXME. Also included a FIXME to ensure that `impl Trait` traits are caught under the lint in #45992. r? @nikomatsakis
bors
commented
Dec 13, 2017
☀️ Test successful - status-appveyor, status-travis |
Fixes#43396.
There's one weird ICE in the interaction with argument-position
impl Trait. I'm still debugging it-- I've left a test for it commented out with a FIXME.Also included a FIXME to ensure that
impl Traittraits are caught under the lint in #45992.r? @nikomatsakis