Skip to content

(Possibly) confusing message in ptr_arg #6964

Closed
@ChrisJefferson

Description

@ChrisJefferson

ptr_arg prints the message:

warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices

I was confused for a while about the "one more reference", as switching does not seem to remove any references.

After some thought, is this referring to the internal implementation of Vec requiring another indirection? In that case, perhaps replace "involves one more reference" with "may produce slower code", or something like that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    L-suggestionLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with Clippy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions