Skip to content

parser rejects "ret ::f()" #762

Closed
Closed
@jruderman

Description

@jruderman
fn f() { }
fn main() { ret ::f(); }

Is incorrectly rejected:

z.rs:2:16:2:18: error: expected ';' or '}' after expression but found ::
z.rs:2 fn main() { ret ::f(); }
                       ^~

fwiw, if I put parens around the call, it's accepted. But the pretty-printer takes out the parens, since they're obviously unnecessary ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions