Allow individual upvars to be inferred as by-value or by-ref in non-escaping closures#21604
Conversation
src/librustc_trans/trans/closure.rs
Outdated
There was a problem hiding this comment.
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