mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
In Clippy 1.67, the `needless_borrowed_reference` lint [was enhanced]
to look into struct and tuple patterns, so that a line like this:
for &(ref module, ref info) in inputs.iter()
where `inputs.iter()` is yielding `&(Module, ModuleInfo)` pairs,
elicits a warning. Clippy suggests, instead:
for (module, info) in inputs.iter()
but this is at odds with Naga's preference that `match` patterns
should have the same type as the expression being matched, for which
we have enabled the `pattern_type_mismatch` lint since
9e5cc4c9 (2021-3-12).
[was enhanced]: https://github.com/rust-lang/rust-clippy/pull/9855