Uh oh!
There was an error while loading. Please reload this page.
Show one error for duplicated type definitions - #37447
Conversation
rust-highfive
commented
Oct 28, 2016
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
bdf3d24 to
03baeefComparenrc
commented
Nov 7, 2016
Could you use a hash set rather than a vec here? (O(1) vs O(n)). |
3132180 to
ea9f167Compareestebank
commented
Nov 7, 2016
@nrc makes complete sense. Changed. |
nrc
commented
Nov 7, 2016
looks good, thanks! @bors: r+ |
bors
commented
Nov 7, 2016
📌 Commit ea9f167 has been approved by |
bors
commented
Nov 7, 2016
⌛ Testing commit ea9f167 with merge 7b8fda8... |
bors
commented
Nov 7, 2016
💔 Test failed - auto-linux-64-opt-rustbuild |
estebank
commented
Nov 7, 2016
@nrc I'm unsure what the error is or how it could have been caused by this patch: What can I do to get a more verbose error in order to fix it? |
nrc
commented
Nov 7, 2016
bors
commented
Nov 9, 2016
☔ The latest upstream changes (presumably #37670) made this pull request unmergeable. Please resolve the merge conflicts. |
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
```ea9f167 to
43aed32Comparealexcrichton
commented
Nov 10, 2016
bors
commented
Nov 10, 2016
📌 Commit 43aed32 has been approved by |
estebank
commented
Nov 10, 2016
@alexcrichton I only fixed the merge conflicts. |
bors
commented
Nov 11, 2016
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.
For the following code:
show
instead of
Fixes#35767.