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
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: