]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #16458 : pcwalton/rust/borrowck-for-moves, r=nikomatsakis
authorbors <bors@rust-lang.org>
Wed, 13 Aug 2014 02:26:23 +0000 (02:26 +0000)
committerbors <bors@rust-lang.org>
Wed, 13 Aug 2014 02:26:23 +0000 (02:26 +0000)
`for` loop heads.

This breaks code like:

    let x = Some(box 1i);
    for &a in x.iter() {
    }

Change this code to obey the borrow checking rules. For example:

    let x = Some(box 1i);
    for &ref a in x.iter() {
    }

Closes #16205.

[breaking-change]

r? @nikomatsakis


Trivial merge