]> git.lizzy.rs Git - rust.git/blobdiff - src/copies.rs
Improve the `match_same_arms` doc
[rust.git] / src / copies.rs
index 2de034f83c2703cb95078a06934e1507b85c3df3..b8eb97cbeed59a043d6899fff0e75484d18fa07c 100644 (file)
@@ -38,7 +38,9 @@
 
 /// **What it does:** This lint checks for `match` with identical arm bodies.
 ///
-/// **Why is this bad?** This is probably a copy & paste error.
+/// **Why is this bad?** This is probably a copy & paste error. If arm bodies are the same on
+/// purpose, you can factor them
+/// [using `|`](https://doc.rust-lang.org/book/patterns.html#multiple-patterns).
 ///
 /// **Known problems:** Hopefully none.
 ///