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

“There is no X in ???. Did you mean to use X?” #32833

Closed
progval opened this issue Apr 8, 2016 · 2 comments · Fixed by #32849
Closed

“There is no X in ???. Did you mean to use X?” #32833

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

Comments

@progval
Copy link
Contributor

progval commented Apr 8, 2016

When useing a module name that does not exist, rustc suggest the same name.

You can reproduce it like this:

$ cargo new foo 
$ cd foo 
$ echo "use bar;" > src/lib.rs
$ cargo build
   Compiling foo v0.1.0 (file:///tmp/foo)
src/lib.rs:1:5: 1:8 error: unresolved import `bar`. There is no `bar` in `???`. Did you mean to use `bar`? [E0432]
src/lib.rs:1 use bar;
                 ^~~
src/lib.rs:1:5: 1:8 help: run `rustc --explain E0432` to see a detailed explanation
@alexcrichton
Copy link
Member

cc @jseyfried

@alexcrichton alexcrichton added the A-diagnostics Area: Messages for errors, warnings, and lints label Apr 8, 2016
@jseyfried
Copy link
Contributor

Fixed

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

resolve: import resolution diagnostics

This improves the diagnostics for failing import resolutions (fixes rust-lang#32833).
r? @eddyb
steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 11, 2016
…tics, r=eddyb

resolve: import resolution diagnostics

This improves the diagnostics for failing import resolutions (fixes rust-lang#32833).
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.

3 participants