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

Structured suggestion for extern crate foo when foo isn't resolved in import #128151

Merged
merged 1 commit into from
Jul 31, 2024

Commits on Jul 29, 2024

  1. Structured suggestion for extern crate foo when foo isn't resolve…

    …d in import
    
    When encountering a name in an import that could have come from a crate that wasn't imported, use a structured suggestion to suggest `extern crate foo;` pointing at the right place in the crate.
    
    When encountering `_` in an import, do not suggest `extern crate _;`.
    
    ```
    error[E0432]: unresolved import `spam`
      --> $DIR/import-from-missing-star-3.rs:2:9
       |
    LL |     use spam::*;
       |         ^^^^ maybe a missing crate `spam`?
       |
    help: consider importing the `spam` crate
       |
    LL + extern crate spam;
       |
    ```
    estebank committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    b61570a View commit details
    Browse the repository at this point in the history