]> git.lizzy.rs Git - rust.git/commitdiff
Improve the `match_same_arms` doc
authormcarton <cartonmartin+git@gmail.com>
Fri, 1 Apr 2016 11:14:39 +0000 (13:14 +0200)
committermcarton <cartonmartin+git@gmail.com>
Fri, 1 Apr 2016 11:14:39 +0000 (13:14 +0200)
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.
 ///