Skip to content

"explicit destructor calls not allowed" error message #72322

Closed
@stanislav-tkach

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

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