6291781592
This fixes borrow checking for closures. Code like this will break: struct Foo { x: int, } pub fn main() { let mut this = &mut Foo { x: 1, }; let r = || { let p = &this.x; &mut this.x; }; r() } Change this code to not take multiple mutable references to the same value. For example: struct Foo { x: int, } pub fn main() { let mut this = &mut Foo { x: 1, }; let r = || { &mut this.x; }; r() } Closes #16361. [breaking-change] r? @nikomatsakis |
||
---|---|---|
.. | ||
borrowck | ||
cfg | ||
save | ||
trans | ||
typeck | ||
astencode.rs | ||
check_const.rs | ||
check_loop.rs | ||
check_match.rs | ||
check_static.rs | ||
const_eval.rs | ||
dataflow.rs | ||
dead.rs | ||
def.rs | ||
dependency_format.rs | ||
effect.rs | ||
entry.rs | ||
expr_use_visitor.rs | ||
freevars.rs | ||
graph.rs | ||
intrinsicck.rs | ||
kind.rs | ||
lang_items.rs | ||
liveness.rs | ||
mem_categorization.rs | ||
pat_util.rs | ||
privacy.rs | ||
reachable.rs | ||
region.rs | ||
resolve_lifetime.rs | ||
resolve.rs | ||
stability.rs | ||
subst.rs | ||
ty_fold.rs | ||
ty.rs | ||
weak_lang_items.rs |