]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #41052 - topecongiro:overlapping_inherent_impls, r=estebank
authorAriel Ben-Yehuda <arielb1@mail.tau.ac.il>
Wed, 5 Apr 2017 23:01:11 +0000 (23:01 +0000)
committerGitHub <noreply@github.com>
Wed, 5 Apr 2017 23:01:11 +0000 (23:01 +0000)
commita69fcfaecfc4c8bfa25621a77f73aade95aea4b4
treeb8dc8ad17b97ded9cbfae772861e7a7236768c64
parent5e410ba5efd5885120ab1bf39a1a1eec85c9d1db
parentdb60b0b374ef4999e3c960a7230b18bcddf82ea0
Rollup merge of #41052 - topecongiro:overlapping_inherent_impls, r=estebank

Make 'overlapping_inherent_impls' lint a hard error

This is ought to be implemented in PR #40728. Unfortunately, when I rebased the PR to resolve merge conflict, the "hard error" code disappeared. This PR complements the initial PR.

Now the following rust code gives the following error:
```rust
struct Foo;

impl Foo {
    fn id() {}
}

impl Foo {
    fn id() {}
}

fn main() {}
```
```
error[E0592]: duplicate definitions with name `id`
 --> /home/topecongiro/test.rs:4:5
  |
4 |     fn id() {}
  |     ^^^^^^^^^^ duplicate definitions for `id`
...
8 |     fn id() {}
  |     ---------- other definition for `id`

error: aborting due to previous error
```