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

rustc emits a misguided "a crate with a similar name exists" help note #59027

Closed
nox opened this issue Mar 8, 2019 · 0 comments
Closed

rustc emits a misguided "a crate with a similar name exists" help note #59027

nox opened this issue Mar 8, 2019 · 0 comments
Labels
A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix`

Comments

@nox
Copy link
Contributor

nox commented Mar 8, 2019

   Compiling script v0.0.1 (/Users/nox/src/servo/components/script)
error[E0412]: cannot find type `Inert` in this scope
   --> components/script/dom/bindings/root.rs:642:26
    |
642 |     type Output = Option<Inert<Dom<T>>>;
    |                          ^^^^^
help: a crate with a similar name exists
    |
642 |     type Output = Option<inert<Dom<T>>>;
    |                          ^^^^^
help: possible candidate is found in another module, you can import it into scope
    |
27  | use inert::Inert;
    |

A crate cannot be a type, so suggesting inert<Dom<T>> is wrong.

@nox nox added the A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` label Mar 8, 2019
bors added a commit that referenced this issue Mar 25, 2019
filter suggestions from extern prelude

Fixes #59027.

Modifies the candidate gathering code to call `filter_fn` on extern crates, which causes them to be filtered out when looking for a type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix`
Projects
None yet
Development

No branches or pull requests

1 participant