Skip to content

librustc: Use the correct categorized mutable type for the pattern in #16458

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 1 commit into from
Aug 13, 2014

Conversation

pcwalton
Copy link
Contributor

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

`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 rust-lang#16205.

[breaking-change]
@alexcrichton
Copy link
Member

👾

bors added a commit that referenced this pull request Aug 13, 2014
`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
@bors bors closed this Aug 13, 2014
@bors bors merged commit 7579185 into rust-lang:master Aug 13, 2014
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.

for loops allow moving out of references
4 participants