Show one error for duplicated type definitions
For the following code:
``` rustc
struct Bar;
struct Bar;
fn main () {
}
```
show
``` nocode
error[E0428]: a type named `Bar` has already been defined in this module
--> src/test/compile-fail/E0428.rs:12:1
|
11 | struct Bar;
| ----------- previous definition of `Bar` here
12 | struct Bar;
| ^^^^^^^^^^^
error: aborting due to previous error
```
instead of
``` nocode
error[E0428]: a type named `Bar` has already been defined in this module
--> src/test/compile-fail/E0428.rs:12:1
|
11 | struct Bar;
| ----------- previous definition of `Bar` here
12 | struct Bar;
| ^^^^^^^^^^^
error[E0428]: a value named `Bar` has already been defined in this module
--> src/test/compile-fail/E0428.rs:12:1
|
11 | struct Bar;
| ----------- previous definition of `Bar` here
12 | struct Bar;
| ^^^^^^^^^^^
error: aborting due to 2 previous errors
```
Fixes #35767.
|
||
|---|---|---|
| .. | ||
| codegen | ||
| codegen-units | ||
| compile-fail | ||
| compile-fail-fulldeps | ||
| debuginfo | ||
| incremental | ||
| mir-opt | ||
| parse-fail | ||
| pretty | ||
| run-fail | ||
| run-fail-fulldeps | ||
| run-make | ||
| run-pass | ||
| run-pass-fulldeps | ||
| run-pass-valgrind | ||
| rustdoc | ||
| ui | ||