RS.CLIPPY.REDUNDANT_PATTERN
Using `name @ _` in a pattern
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: redundant_pattern. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for patterns in the form name @ _.
Why is this bad?
It's almost always more readable to just use direct bindings.
Example
match v {
Some(x) => (),
y @ _ => (),
}
Use instead:
match v {
Some(x) => (),
y => (),
}