Skip to content

E0081 needs to be updated to new format #35224

Closed
@sophiajt

Description

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

Error E0081 needs a span_label and a span_note replaced with span_label, updating it from:

error[E0081]: discriminant value `3isize` already exists
  --> src/test/compile-fail/E0081.rs:13:5
   |
13 |     X = 3, //~ ERROR E0081
   |     ^^^^^
   |
note: conflicting discriminant here
  --> src/test/compile-fail/E0081.rs:12:5
   |
12 |     P = 3,
   |     ^^^^^

to:

error[E0081]: discriminant value `3isize` already exists
  --> src/test/compile-fail/E0081.rs:13:5
   |
12 |     P = 3,
   |     ----- first use of `3isize`
13 |     X = 3, //~ ERROR E0081
   |     ^^^^^ enum already has `3isize`

Bonus: this may be nicer with spans that focus on the value.

error[E0081]: discriminant value `3isize` already exists
  --> src/test/compile-fail/E0081.rs:13:5
   |
12 |     P = 3,
   |         - first use of `3isize`
13 |     X = 3, //~ ERROR E0081
   |         ^ enum already has `3isize`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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