Skip to content

Only emit one error for use foo::self; #42580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2017
Merged

Conversation

tommyip
Copy link
Contributor

@tommyip tommyip commented Jun 10, 2017

Currently use foo::self; would emit both E0429 and E0432. This commit silence the latter one (assuming foo is a valid module).

Fixes #42559

@rust-highfive
Copy link
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@@ -11,4 +11,7 @@
use foo::self; //~ ERROR unresolved import `foo::self`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess if foo is invalid we should still have both errors?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes sense to improve errors in this area, all examples from #42559 should be legal anyway, I'll try to submit a PR somewhere after June 17.

@eddyb
Copy link
Member

eddyb commented Jun 10, 2017

r? @jseyfried or @petrochenkov

@rust-highfive rust-highfive assigned jseyfried and unassigned eddyb Jun 10, 2017
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 10, 2017

📌 Commit 4640f4d has been approved by petrochenkov

@bors
Copy link
Collaborator

bors commented Jun 10, 2017

⌛ Testing commit 4640f4d with merge 5b5fcca...

Currently `use foo::self;` would emit both E0429 and E0432. This
commit silence the latter one (assuming `foo` is a valid module).

Fixes rust-lang#42559
@tommyip
Copy link
Contributor Author

tommyip commented Jun 10, 2017

Fixed the tests

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 10, 2017

📌 Commit b89db83 has been approved by petrochenkov

@bors
Copy link
Collaborator

bors commented Jun 10, 2017

⌛ Testing commit b89db83 with merge 4bf5c99...

bors added a commit that referenced this pull request Jun 10, 2017
Only emit one error for `use foo::self;`

Currently `use foo::self;` would emit both E0429 and E0432. This commit silence the latter one (assuming `foo` is a valid module).

Fixes #42559
@bors
Copy link
Collaborator

bors commented Jun 10, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: petrochenkov
Pushing 4bf5c99 to master...

@bors bors merged commit b89db83 into rust-lang:master Jun 10, 2017
@tommyip tommyip deleted the import-error branch June 11, 2017 11:21
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.

6 participants