]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #20432 : nikomatsakis/rust/fn-inference-2, r=eddyb
authorbors <bors@rust-lang.org>
Sat, 3 Jan 2015 14:20:47 +0000 (14:20 +0000)
committerbors <bors@rust-lang.org>
Sat, 3 Jan 2015 14:20:47 +0000 (14:20 +0000)
Previously, the borrow mode of each upvar was inferred as part of regionck. This PR moves it into its own separate step. It also employs the `ExprUseVisitor`, further simplifying the code. The eventual goal is to support better inference of `Fn` vs `FnMut` vs `FnOnce` that is not based on the expected type, as well as supporting individual by-move upvars.

r? @eddyb


Trivial merge