Closed
Description
We currently emit the following:
error[E0529]: expected an array or slice, found `Vec<types::GenericBound>`
--> src/librustdoc/clean/mod.rs:593:28
|
593 | if let [] | [GenericBound::TraitBound(_, hir::TraitBoundModifier::Maybe)] = &bounds {
| ^^ pattern cannot match with input type `Vec<types::GenericBound>`
error[E0529]: expected an array or slice, found `Vec<types::GenericBound>`
--> src/librustdoc/clean/mod.rs:593:33
|
593 | if let [] | [GenericBound::TraitBound(_, hir::TraitBoundModifier::Maybe)] = &bounds {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern cannot match with input type `Vec<types::GenericBound>`
Ideally we should mention the appropriate solution, to use &bounds[..]
instead.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Suggestions generated by the compiler applied by `cargo fix`Diagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: An error or lint that needs small tweaks.Low priorityRelevant to the compiler team, which will review and decide on the PR/issue.