summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/multiple_inherent_impl.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/src/docs/multiple_inherent_impl.txt')
-rw-r--r--src/tools/clippy/src/docs/multiple_inherent_impl.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/multiple_inherent_impl.txt b/src/tools/clippy/src/docs/multiple_inherent_impl.txt
new file mode 100644
index 000000000..9d4228656
--- /dev/null
+++ b/src/tools/clippy/src/docs/multiple_inherent_impl.txt
@@ -0,0 +1,26 @@
+### What it does
+Checks for multiple inherent implementations of a struct
+
+### Why is this bad?
+Splitting the implementation of a type makes the code harder to navigate.
+
+### Example
+```
+struct X;
+impl X {
+ fn one() {}
+}
+impl X {
+ fn other() {}
+}
+```
+
+Could be written:
+
+```
+struct X;
+impl X {
+ fn one() {}
+ fn other() {}
+}
+``` \ No newline at end of file