Skip to content

Can't parse binops after blocks in... some cases(?) #7909

Closed
@bblum

Description

@bblum

This gives unexpected token on the ==. But if you change foo to use explicit return, with a semicolon after it, or if you put the binary equals expression inside of an assert, it appears to work fine.

fn foo() -> bool {
    { true } == true
}
fn main() {}

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