Skip to content
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

Parsing bug in 02/22 nightly #58962

Closed
nipunn1313 opened this issue Mar 6, 2019 · 2 comments
Closed

Parsing bug in 02/22 nightly #58962

nipunn1313 opened this issue Mar 6, 2019 · 2 comments
Labels
A-parser Area: The parsing of Rust source code to an AST

Comments

@nipunn1313
Copy link
Contributor

nipunn1313 commented Mar 6, 2019

Haven't confirmed if it has been fixed since 02/22

pub fn f<F: FnOnce(u64) -> u64>(f1: F) -> u64 {
        f1(1)
}

#[test]
fn test_weird_rustc_thing() {
    let y = f({
        |x| x+1
    ); // shouldn't this need a closing curly brace?
    assert_eq!(y, 2);
    println!("WEIRD RUSTC BUG");
}

Seems to only repro inside an inner mod.

Here's a link to a repro
https://github.com/nipunn1313/rustc_parser_bug

@estebank estebank added the A-parser Area: The parsing of Rust source code to an AST label Mar 6, 2019
@estebank
Copy link
Contributor

estebank commented Mar 6, 2019

Introduced in #57944. Will be fixed in #58903. Duplicate of #58886.

@estebank estebank closed this as completed Mar 6, 2019
@nipunn1313
Copy link
Contributor Author

Thanks! #57944 looks pretty great. Especially given the test case on the fix https://github.com/rust-lang/rust/pull/58903/files#diff-44324609d226c76463a9b78f62aba74d !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area: The parsing of Rust source code to an AST
Projects
None yet
Development

No branches or pull requests

2 participants