Skip to content

E0493 needs to be updated to new format #35999

Closed
@sophiajt

Description

@sophiajt

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

E0493 needs a span_label, updating it from:

error[E0493]: constants are not allowed to have destructors
  --> src/test/compile-fail/E0493.rs:19:17
   |
19 | const F : Foo = Foo { a : 0 }; //~ ERROR E0493
   |                 ^^^^^^^^^^^^^

To:

error[E0493]: constants are not allowed to have destructors
  --> src/test/compile-fail/E0493.rs:19:17
   |
19 | const F : Foo = Foo { a : 0 }; //~ ERROR E0493
   |                 ^^^^^^^^^^^^^ constants cannot have destructors

Bonus: show a label where the destructor is defined:

error[E0493]: constants are not allowed to have destructors
  --> src/test/compile-fail/E0493.rs:19:17
   |
16 |     fn drop(&mut self) {}
   |     --------------------- destructor defined here
...
19 | const F : Foo = Foo { a : 0 }; //~ ERROR E0493
   |                 ^^^^^^^^^^^^^ constants cannot have destructors

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.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