Skip to content

Tuple index not parsed correctly #2659

@P-E-P

Description

@P-E-P

GCCRS finds a float literal instead of a tuple index

I tried this code:

fn main () {
    (1, (2, 3)).1.1;
}

I expected to see this happen: Code compiles

Instead, this happened:

./test.rs:2:16: error: failed to parse path expr segment of method call expr
    2 |     (1, (2, 3)).1.1;
      |                ^
./test.rs:2:5: error: failed to parse statement or expression in block expression
    2 |     (1, (2, 3)).1.1;
      |     ^
./test.rs:2:17: error: unrecognised token ‘float literal’ for start of item
    2 |     (1, (2, 3)).1.1;
      |                 ^~~
./test.rs:2:17: error: failed to parse item in crate

Meta

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions