Skip to content

E0023 needs to be updated to new format #35196

Closed
@sophiajt

Description

@sophiajt

From: src/test/compile-fail/E0023.rs

E0023 needs span_labels, taking it from:

error[E0023]: this pattern has 1 fields, but the corresponding variant has 2 fields
  --> src/test/compile-fail/E0023.rs:19:9
   |
19 |         Fruit::Apple(a) => {}, //~ ERROR E0023
   |         ^^^^^^^^^^^^^^^

To:

error[E0023]: this pattern has 1 fields, but the corresponding variant has 2 fields
  --> src/test/compile-fail/E0023.rs:19:9
   |
19 |         Fruit::Apple(a) => {}, //~ ERROR E0023
   |         ^^^^^^^^^^^^^^^ expected 2 fields, found 1

Bonus: "this pattern has 1 fields" isn't good English. You could detect the number and change "fields" to "field" or reword this to be "this pattern has 1 field(s)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions