rust/tests/ui/unresolved
Esteban Küber b61570ac11 Structured suggestion for extern crate foo when foo isn't resolved 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;
   |
```
2024-07-29 23:49:51 +00:00
..
auxiliary
unresolved-asterisk-imports.rs
unresolved-asterisk-imports.stderr Structured suggestion for extern crate foo when foo isn't resolved in import 2024-07-29 23:49:51 +00:00
unresolved-candidates.rs
unresolved-candidates.stderr
unresolved-extern-mod-suggestion.rs
unresolved-extern-mod-suggestion.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
unresolved-import-avoid-suggesting-global-path.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unresolved-import-avoid-suggesting-global-path.stderr
unresolved-import-recovery.rs
unresolved-import-recovery.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
unresolved-import-suggest-disambiguated-crate-name.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unresolved-import-suggest-disambiguated-crate-name.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unresolved-import-suggest-disambiguated-crate-name.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
unresolved-import.rs Structured suggestion for extern crate foo when foo isn't resolved in import 2024-07-29 23:49:51 +00:00
unresolved-import.stderr Structured suggestion for extern crate foo when foo isn't resolved in import 2024-07-29 23:49:51 +00:00