Skip to content

Rustc scoping regression #40235

Closed
Closed
@Rupsbant

Description

@Rupsbant

The following code does not compile with rustc 1.17.0-nightly (c0b7112ba 2017-03-02). Compiles with stable-x86_64-unknown-linux-gnu unchanged - rustc 1.14.0 (e8a012324 2016-12-16). Testing with updated stable release.

fn n(c: u64) -> u64 {
    c
}
pub fn main() {
    let v = vec![1,2,3];
    let mut it = v.iter();
    while let Some(n) = it.next() {
        println!("{}", n);
    }
    assert!(n(1) == 1);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions