Skip to content

infallible_destructuring_match misses ref in suggested fix #7499

Closed
@chevdor

Description

@chevdor

I am using clippy 0.1.55 (88539999 2021-07-06).

The suggestion given for:

let t1 = match type_section.types()[1] {
   Type::Function(ref func_type) => func_type
};

is:

let Type::Function(t1) = type_section.types()[1];

it should actually include the ref:

let Type::Function(ref t1) = type_section.types()[1];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions