Skip to content

Incorrect span with bad imports #6074

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

Closed
emberian opened this issue Apr 26, 2013 · 3 comments
Closed

Incorrect span with bad imports #6074

emberian opened this issue Apr 26, 2013 · 3 comments

Comments

@emberian
Copy link
Member

use foo::bar;

generates:

k.rs:1:4: 1:13 error: unresolved name
k.rs:1 use foo::bar;
           ^~~~~~~~~
k.rs:1:4: 1:13 error: failed to resolve import: foo::bar
k.rs:1 use foo::bar;
           ^~~~~~~~~
error: failed to resolve imports
error: aborting due to 3 previous errors

I believe the span on the first error should just cover foo, not the whole path (that is a path, yes?)

@bstrie
Copy link
Contributor

bstrie commented Apr 26, 2013

This would clean up the final detail of #3027.

@jdm
Copy link
Contributor

jdm commented May 10, 2013

Was this closed because it can no longer be reproduced?

@emberian
Copy link
Member Author

I fixed it in #6347, partially, and have a few more patches to fix up the other cases.

flip1995 pushed a commit to flip1995/rust that referenced this issue Oct 9, 2020
…, r=matthiaskrgr

Fix a FP in `explicit_counter_loop`

Fixes rust-lang#4677 and rust-lang#6074

Fix a false positive in `explicit_counter_loop` where the loop counter is used after incremented, adjust the test so that counters are incremented at the end of the loop and add the test for this false positive.

---

changelog: Fix a false positive in `explicit_counter_loop` where the loop counter is used after incremented
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

No branches or pull requests

3 participants