Skip to content

"explicit destructor calls not allowed" error message #72322

Description

@stanislav-tkach

Many of rustc errors contain a hint on how to fix them, but not this one. For example:

9 |     s.drop();
  |       ^^^^ explicit destructor calls not allowed

I suppose the error message can be more friendly by suggesting to use drop(s) instead of s.drop().

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`D-papercutDiagnostics: An error or lint that needs small tweaks.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