Skip to content

Suggest removal of stray ; after struct definition #46186

Closed
@estebank

Description

@estebank

For the given code

struct Struct {
    a: usize,
};

the output is only

error: expected item, found `;`
  --> file.rs:15:2
   |
15 | };
   |  ^

where it should suggest removing the semicolon (as a suggestion so the RLS does the right thing)

error: expected item, found `;`
  --> file.rs:15:2
   |
15 | };
   |  ^ consider removing this semicolon

This is an edge situation, but I feel it is a common enough typo I've made and that is very likely to happen to newcomers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.WG-diagnosticsWorking group: Diagnostics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions