Skip to content

Conversation

jseyfried
Copy link
Contributor

This PR improves and regularizes the diagnostics for duplicate definitions and imports.

After this PR, the second of two duplicate definitions/imports will have the following form:

a(n) [value|type|module|trait|extern crate] named _name_ has already been [defined|imported] in this [module|block|trait|enum]

with a note referencing the first of the two duplicate definitions/imports:

previous [definition|import] of _name_ here

The error indices remain unchanged.

r? @eddyb

@jseyfried jseyfried force-pushed the name_conflict_diagnostics branch from 2b70c17 to b3c6265 Compare March 16, 2016 08:53
@jseyfried
Copy link
Contributor Author

cc @petrochenkov

@eddyb
Copy link
Member

eddyb commented Mar 16, 2016

@bors r+ Nice!

@bors
Copy link
Collaborator

bors commented Mar 16, 2016

📌 Commit b3c6265 has been approved by eddyb

@bors
Copy link
Collaborator

bors commented Mar 16, 2016

⌛ Testing commit b3c6265 with merge 27db693...

@bors
Copy link
Collaborator

bors commented Mar 16, 2016

💔 Test failed - auto-win-gnu-32-opt-rustbuild

@alexcrichton
Copy link
Member

@bors: retry

On Wed, Mar 16, 2016 at 2:20 PM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-win-gnu-32-opt-rustbuild
http://buildbot.rust-lang.org/builders/auto-win-gnu-32-opt-rustbuild/builds/380


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#32284 (comment)

@bors
Copy link
Collaborator

bors commented Mar 16, 2016

⌛ Testing commit b3c6265 with merge 6e0f2f2...

bors added a commit that referenced this pull request Mar 16, 2016
Resolve: improve diagnostics for duplicate definitions and imports

This PR improves and regularizes the diagnostics for duplicate definitions and imports.

After this PR, the second of two duplicate definitions/imports will have the following form:
> a(n) [value|type|module|trait|extern crate] named \`*name*\` has already been [defined|imported] in this [module|block|trait|enum]

with a note referencing this first of the two duplicate definitions/imports:
> previous [definition|import] of \`*name*\` here

The error indices remain unchanged.

r? @eddyb
@bors bors merged commit b3c6265 into rust-lang:master Mar 17, 2016
@bors bors mentioned this pull request Mar 17, 2016
@jseyfried jseyfried deleted the name_conflict_diagnostics branch March 25, 2016 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants