]> git.lizzy.rs Git - rust.git/commit
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)
commitee87234eed95d6077247bee5416339ce2652b599
tree4e095e0281a5fe2586f7364ab4e8a34edc27b700
parente189122e9a922438f02b639948f75df765cd370e
parent7579185b4c83180d8e737a65c9f459bfe8e32ad5
auto merge of #16458 : pcwalton/rust/borrowck-for-moves, r=nikomatsakis

`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