Skip to content

Clippy recommends use of unstable Self constructors, which cause an ICE #3567

Closed
@DianaNites

Description

@DianaNites

This is using clippy clippy 0.0.212 (2e26fdc2 2018-11-22)

Given this example, clippy will suggest TestStruct::from_something() entirely be replaced with Self(), which is incorrect, and causes the compiler to ICE due to rust-lang/rust#56611

Of note is that VSCode with RLS will offer code actions to automatically do this transformation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedL-suggestionLint: Improving, adding or fixing lint suggestions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions