rust/compiler
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
..
rustc The rustc crate feature is called jemalloc 2024-07-15 13:01:20 -04:00
rustc_abi Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_arena Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ast Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ast_ir Use dep: for crate dependencies 2024-07-15 12:40:10 -04:00
rustc_ast_lowering Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ast_passes Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ast_pretty Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_attr Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_baked_icu_data Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
rustc_borrowck Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_builtin_macros Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_codegen_cranelift Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
rustc_codegen_gcc Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
rustc_codegen_llvm Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
rustc_codegen_ssa Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_const_eval Rollup merge of #128277 - RalfJung:offset_from_wildcard, r=oli-obk 2024-07-29 11:42:34 +02:00
rustc_data_structures Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_driver Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
rustc_driver_impl Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_error_codes Rollup merge of #127853 - folkertdev:naked-function-error-messages, r=bjorn3 2024-07-28 08:57:16 +02:00
rustc_error_messages Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_errors Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_expand Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_feature Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_fluent_macro Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_fs_util Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_graphviz Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_hir Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_hir_analysis Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_hir_pretty Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_hir_typeck Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_incremental Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_index Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_index_macros Remove usage of specialization from newtype_index! 2024-06-30 16:42:53 +00:00
rustc_infer Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_interface Structured suggestion for extern crate foo when foo isn't resolved in import 2024-07-29 23:49:51 +00:00
rustc_lexer Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_lint Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_lint_defs Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_llvm Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_log Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_macros Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_metadata Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_middle Rollup merge of #128304 - Zalathar:thir-pat-display, r=Nadrieril 2024-07-29 11:42:34 +02:00
rustc_mir_build Rollup merge of #128304 - Zalathar:thir-pat-display, r=Nadrieril 2024-07-29 11:42:34 +02:00
rustc_mir_dataflow Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_mir_transform Perform instsimplify before inline to eliminate some trivial calls 2024-07-29 18:14:35 +08:00
rustc_monomorphize Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_next_trait_solver Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_parse Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_parse_format Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_passes Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_pattern_analysis Rollup merge of #128304 - Zalathar:thir-pat-display, r=Nadrieril 2024-07-29 11:42:34 +02:00
rustc_privacy Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_query_impl Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_query_system Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_resolve Structured suggestion for extern crate foo when foo isn't resolved in import 2024-07-29 23:49:51 +00:00
rustc_sanitizers Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_serialize Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_session Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_smir Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_span Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_symbol_mangling Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_target Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
rustc_trait_selection Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_traits Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_transmute Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ty_utils Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_type_ir Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_type_ir_macros Reformat use declarations. 2024-07-29 08:26:52 +10:00
stable_mir Reformat use declarations. 2024-07-29 08:26:52 +10:00