Closed
Description
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 3 fields
--> clippy_lints/src/needless_borrow.rs:50:20
|
50 | if let ty::Ref(_) = cx.typeck_results().expr_ty(inner).kind() {
| ^^^^^^^^^^ expected 3 fields, found 1
trying to ignore the inner fields with ty::Ref(_)
does not work because it has 3 fields.
The message could suggest Ref(..)
if there are multiple fields and it thinks we don't want to bind any:
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 3 fields
--> clippy_lints/src/needless_borrow.rs:50:20
|
50 | if let ty::Ref(_) = cx.typeck_results().expr_ty(inner).kind() {
| ^^^^^^^^^^ expected 3 fields, found 1
= help: Use `ty::Ref(..)` to ignore any inner fields
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsRelating to patterns and pattern matchingArea: Suggestions generated by the compiler applied by `cargo fix`Category: An issue proposing an enhancement or a PR with one.Diagnostics: An error or lint that needs small tweaks.Relevant to the compiler team, which will review and decide on the PR/issue.