Skip to content

Super weird parse error #10498

Closed
Closed
@emberian

Description

@emberian
struct Bar {
    x: int,
    y: uint
}

fn main() {
    let r = &mut Bar {
        x, 12,
        y: 32
    };
}

gives

foo.rs:7:21: 7:22 error: expected `;` but found `{`
foo.rs:7     let r = &mut Bar {
                              ^
task 'rustc' failed at 'explicit failure', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:75
task '<main>' failed at 'explicit failure', /build/rust-git/src/rust/src/librustc/lib.rs:396

cc @jbclements

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea: The lexing & parsing of Rust source code to an AST

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions