Skip to content

false positive on ptr_arg against &Vec<_> #214

Closed
@llogiq

Description

@llogiq

It's not possible to call any of Vec's methods on a slice, whether mutable or not. So if any method of Vec is called, the lint message has to be considered a false positive.

Example: fn foo(v: &Vec<Name>, n: Name) { v.push(n); }

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.I-false-positiveIssue: The lint was triggered on code it shouldn't haveT-ASTType: Requires working with the ASTT-middleType: Probably requires verifiying types

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions