-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #37447 - estebank:non-duplicate-definition-error, r=nrc
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.
- Loading branch information
Showing
5 changed files
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters