rust/compiler/rustc_interface/src
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
..
callbacks.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
errors.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
interface.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
lib.rs Move codegen_and_build_linker from Queries to Linker 2024-07-01 11:00:49 +00:00
passes.rs Structured suggestion for extern crate foo when foo isn't resolved in import 2024-07-29 23:49:51 +00:00
proc_macro_decls.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
queries.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
tests.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
util.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00