Skip to content

Confusing error message when not having a variable name #73750

Closed
@AZanellato

Description

@AZanellato

I had a weird error message on the rust compiler when trying to compile something like this:

let Struct { name: "a".to_string() }

Here is a playground link that reproduces it better.

This gives out a weird expected ',' error, which wasn't at all what I was expecting. Certainly because of my sleepy state, but still weird.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTC-enhancementCategory: An issue proposing an enhancement or a PR with one.D-confusingDiagnostics: Confusing error or lint that should be reworked.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions