Skip to content
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

Duplicate path resolution errors in resolve #32760

Closed
jseyfried opened this issue Apr 6, 2016 · 2 comments · Fixed by #32789
Closed

Duplicate path resolution errors in resolve #32760

jseyfried opened this issue Apr 6, 2016 · 2 comments · Fixed by #32789
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@jseyfried
Copy link
Contributor

For example,

mod foo {}

use foo::bar::baz::{}; // This emits 2 errors
fn main() {
    foo::bar::baz(); // This emits 2 errors
    <() as foo::bar>::baz(); // This emits 3 errors
    foo::bar::baz { x: 0 } // This emits 2 errors
}
@Aatch Aatch added the A-diagnostics Area: Messages for errors, warnings, and lints label Apr 6, 2016
@Aatch
Copy link
Contributor

Aatch commented Apr 6, 2016

Looks like the errors aren't true duplicates, instead it first complains about not finding bar in foo, then complains about not being able to resolve foo::bar::baz.

The general pattern is where B fails because A fails and B depends on A, we should probably be detecting these cases and silencing the dependent errors.

@jseyfried
Copy link
Contributor Author

Indeed -- I should have been more specific.

Manishearth added a commit to Manishearth/rust that referenced this issue Apr 7, 2016
…ors, r=eddyb

resolve: Avoid emitting redundant path resolution errors

This PR avoids emitting redundant path resolution errors in `resolve` (fixes rust-lang#32760).

r? @eddyb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants