Skip to content

Projections of nested tuple structs turn into syntax errors #1063

Closed
@sorear

Description

@sorear

Start with this valid code (playpen: https://is.gd/rPUytX):

fn main() {
    let x = ((1u8, 2), 3);
    println!("{}", x.0 .0);
}

Click "format"; rustfmt will delete the space in .0 .0, but .0.0 is a syntax error because the lexer interprets 0.0 as a float literal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPanic, non-idempotency, invalid code, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions