Skip to content

"explicit destructor calls not allowed" error message #72322

Closed
@stanislav-tkach

Description

@stanislav-tkach
Contributor

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

added
A-diagnosticsArea: Messages for errors, warnings, and lints
A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`
on May 18, 2020
added
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.
on May 18, 2020
stanislav-tkach

stanislav-tkach commented on May 19, 2020

@stanislav-tkach
ContributorAuthor

I would like to try to address this issue.

added 2 commits that reference this issue on May 29, 2020

Rollup merge of rust-lang#72383 - DarkEld3r:issue-72322, r=matthewjasper

b08978e

Rollup merge of rust-lang#72383 - DarkEld3r:issue-72322, r=matthewjasper

9c1f203
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

      Participants

      @estebank@stanislav-tkach@csmoe

      Issue actions

        "explicit destructor calls not allowed" error message · Issue #72322 · rust-lang/rust