Skip to content

E0529 should suggest turning the matched Vec into a slice #63414

Closed
@estebank

Description

@estebank
error[E0529]: expected an array or slice, found `std::vec::Vec<{integer}>`
  --> src/test/ui/suggestions/vec-macro-in-pattern.fixed:4:14
   |
LL |         Some([x]) => ()
   |              ^^^ pattern cannot match with input type `std::vec::Vec<{integer}>`

error: aborting due to previous error

CC #63399

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`C-enhancementCategory: An issue proposing an enhancement or a PR with one.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.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

    No branches or pull requests

    Issue actions