Skip to content

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

Merged
merged 4 commits into from
Jan 30, 2015

Conversation

nikomatsakis
Copy link
Contributor

r? @eddyb

@@ -100,8 +100,7 @@ fn load_unboxed_closure_environment<'blk, 'tcx>(
#[derive(PartialEq)]
pub enum ClosureKind<'tcx> {
Copy link
Member

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.

Copy link
Member

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.

@eddyb
Copy link
Member

eddyb commented Jan 24, 2015

r=me with nits fixed. There seems to be partial overlap with #21598, but I don't think it will be an issue.

@aturon
Copy link
Member

aturon commented Jan 25, 2015

\o/

@nikomatsakis nikomatsakis force-pushed the closure-move-indiv-vars branch from 8ec5d3a to 4bfba7e Compare January 27, 2015 02:15
@nikomatsakis
Copy link
Contributor Author

@bors r=eddyb 4bfba7e9cb4acd5911307a14a9552bff254afeaa

@eddyb
Copy link
Member

eddyb commented Jan 27, 2015

@nikomatsakis did you mean to include @kvark's commit into this?

@eddyb
Copy link
Member

eddyb commented Jan 27, 2015

Oh it's in master already. @bors r- until that's fixed.

@nikomatsakis nikomatsakis force-pushed the closure-move-indiv-vars branch 2 times, most recently from 617dfb5 to 5272887 Compare January 27, 2015 14:48
@nikomatsakis
Copy link
Contributor Author

@bors r=eddyb 5272887b8b0cd60465b0fb251a3d840b12f62cb9

@nikomatsakis
Copy link
Contributor Author

@eddyb corrected

@bors
Copy link
Collaborator

bors commented Jan 27, 2015

⌛ Testing commit 5272887 with merge 6534aa5...

@bors
Copy link
Collaborator

bors commented Jan 27, 2015

💔 Test failed - auto-mac-32-opt

@alexcrichton
Copy link
Member

@bors: retry

@nikomatsakis nikomatsakis force-pushed the closure-move-indiv-vars branch from 5272887 to e58a960 Compare January 29, 2015 09:45
@nikomatsakis
Copy link
Contributor Author

@bors r=eddyb e58a96053ea29444af6f5a21c9e529d9fb15d211

@bors
Copy link
Collaborator

bors commented Jan 29, 2015

⌛ Testing commit e58a960 with merge 0aacf2f...

@bors
Copy link
Collaborator

bors commented Jan 29, 2015

💔 Test failed - auto-linux-64-nopt-t

@nikomatsakis
Copy link
Contributor Author

Grr, this test failure is very strange! Certainly I didn't see it locally.

@nikomatsakis nikomatsakis force-pushed the closure-move-indiv-vars branch from e58a960 to ced1062 Compare January 30, 2015 14:25
@nikomatsakis
Copy link
Contributor Author

@bors r=eddyb ced1062

@bors
Copy link
Collaborator

bors commented Jan 30, 2015

⌛ Testing commit ced1062 with merge 3fbfad3...

@bors
Copy link
Collaborator

bors commented Jan 30, 2015

@bors bors merged commit ced1062 into rust-lang:master Jan 30, 2015
@nikomatsakis nikomatsakis deleted the closure-move-indiv-vars branch March 30, 2016 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants