-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: Confusing error or lint; hard to understand for new users.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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.
leonardo-m
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: Confusing error or lint; hard to understand for new users.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Vec
as a slice #87033Auto merge of rust-lang#87033 - FabianWolff:issue-87017, r=estebank