diff options
Diffstat (limited to 'src/docs/should_implement_trait.txt')
| -rw-r--r-- | src/docs/should_implement_trait.txt | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/docs/should_implement_trait.txt b/src/docs/should_implement_trait.txt deleted file mode 100644 index 02e74751ae0..00000000000 --- a/src/docs/should_implement_trait.txt +++ /dev/null @@ -1,22 +0,0 @@ -### What it does -Checks for methods that should live in a trait -implementation of a `std` trait (see [llogiq's blog -post](http://llogiq.github.io/2015/07/30/traits.html) for further -information) instead of an inherent implementation. - -### Why is this bad? -Implementing the traits improve ergonomics for users of -the code, often with very little cost. Also people seeing a `mul(...)` -method -may expect `*` to work equally, so you should have good reason to disappoint -them. - -### Example -``` -struct X; -impl X { - fn add(&self, other: &X) -> X { - // .. - } -} -``` \ No newline at end of file |
