RS.CLIPPY.MATCH_OVERLAPPING_ARM
A `match` with overlapping arms
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: match_overlapping_arm. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for overlapping match arms.
Why is this bad?
It is likely to be an error and if not, makes the code less obvious.
Example
let x = 5;
match x {
1..=10 => println!("1 ... 10"),
5..=15 => println!("5 ... 15"),
_ => (),
}