-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Allow individual upvars to be inferred as by-value or by-ref in non-escaping closures #21604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -100,8 +100,7 @@ fn load_unboxed_closure_environment<'blk, 'tcx>( | |||
#[derive(PartialEq)] | |||
pub enum ClosureKind<'tcx> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'tcx
is not used here anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a second note, ClosureEnv
can now become Closure(&'a [ty::Freevar]) | NotClosure
, which seems more idiomatic.
r=me with nits fixed. There seems to be partial overlap with #21598, but I don't think it will be an issue. |
\o/ |
8ec5d3a
to
4bfba7e
Compare
@bors r=eddyb 4bfba7e9cb4acd5911307a14a9552bff254afeaa |
@nikomatsakis did you mean to include @kvark's commit into this? |
Oh it's in master already. @bors r- until that's fixed. |
617dfb5
to
5272887
Compare
@bors r=eddyb 5272887b8b0cd60465b0fb251a3d840b12f62cb9 |
@eddyb corrected |
⌛ Testing commit 5272887 with merge 6534aa5... |
💔 Test failed - auto-mac-32-opt |
@bors: retry |
5272887
to
e58a960
Compare
@bors r=eddyb e58a96053ea29444af6f5a21c9e529d9fb15d211 |
⌛ Testing commit e58a960 with merge 0aacf2f... |
💔 Test failed - auto-linux-64-nopt-t |
Grr, this test failure is very strange! Certainly I didn't see it locally. |
…idual variables. Also add test. Fixes rust-lang#16749.
paren sugar is legal.
e58a960
to
ced1062
Compare
⌛ Testing commit ced1062 with merge 3fbfad3... |
r? @eddyb