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

Better import error #6072

Merged
merged 2 commits into from Apr 27, 2013

Conversation

Projects
None yet
3 participants
@cmr
Copy link
Member

cmr commented Apr 26, 2013

No description provided.

cmr added some commits Apr 26, 2013

Offer a hint on some unresolved imports
I didn't know how to use "use" initially, and an error message like this would
have solved quite a bit of frustration. I think this properly handles cases
where it's not appropriate but I'm not sure.
@bstrie

This comment has been minimized.

Copy link
Contributor

bstrie commented Apr 26, 2013

What sort of errors does this trigger on? Can you provide a test case?

@cmr

This comment has been minimized.

Copy link
Member

cmr commented Apr 26, 2013

Literally a testcase, in the test suite? Otherwise, afaik, it only triggers when you have:

use foo;

which is invalid (I think it is, anyway, not sure, 🆕bie. Currently reported as "unresolved import"), but will NOT trigger on

use foo::bar;

which is valid, but if bar doesn't exist is reported as "failed to resolve imports", and if foo doesn't exist an additional error is reported, "unresolved name", although the span is wrong... I'll open an issue for that.

@bstrie

This comment has been minimized.

Copy link
Contributor

bstrie commented Apr 26, 2013

Ah, I see. Seems innocuous enough to not need a test (not even sure how you'd test this in the first place).

@bstrie

This comment has been minimized.

Copy link
Contributor

bstrie commented Apr 26, 2013

r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented on 8dd9dc9 Apr 27, 2013

This comment has been minimized.

Copy link
Contributor

bors replied Apr 27, 2013

merging cmr/rust/better_import_error = 8dd9dc9 into auto

This comment has been minimized.

Copy link
Contributor

bors replied Apr 27, 2013

cmr/rust/better_import_error = 8dd9dc9 merged ok, testing candidate = 9f11886

This comment has been minimized.

Copy link
Contributor

bors replied Apr 27, 2013

fast-forwarding incoming to auto = 9f11886

@bors bors closed this Apr 27, 2013

@bors bors merged commit 8dd9dc9 into rust-lang:incoming Apr 27, 2013

1 check passed

default all tests passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment