Skip to content

anonymous obj expression-statement is rejected #761

Closed
@jruderman

Description

@jruderman
fn main() { (obj () {  }); }

pretty-prints as

fn main() { obj () {  } }

which is rejected with the message "expecting ident", pointing at the "()" after "obj".

I'm guessing this is a parser bug rather than a pretty-printer bug, since rust is mostly an expression language.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions