rust/compiler/rustc_resolve/src
Matthias Krüger 190a1a7f74
Rollup merge of #142730 - bend-n:suggest_declaring_modules_when_file_found_but_module_not_defined, r=petrochenkov
suggest declaring modules when file found but module not defined

suggests declaring modules when a module is found but not defined, i.e
```
├── main.rs: `use thing::thang;`
└── thing.rs: `struct thang`
```
or
```
├── main.rs: `use thing::thang;`
└── thing
    └── mod.rs: `struct thang`
```
which currently is just
```rust
error[E0432]: unresolved import `yeah`
 --> src/main.rs:1:1
  |
1 | use thing::thang;
  |     ^^^^^ use of unresolved module or unlinked crate `thing`
  |
```
but now would have this nice help:
```text
= help: you may have forgotten to declare the module `thing`. use `mod thing` in this file to declare this module.
```
2025-06-27 22:13:02 +02:00
..
late Make missing lifetime suggestion verbose 2025-06-24 18:59:42 +00:00
rustdoc Update tests to work with new DocFragment field and redundant_explicit_links new API 2025-06-23 16:02:34 +02:00
build_reduced_graph.rs resolve: Tweak private_macro_use lint to be compatible with upcoming macro prelude changes 2025-06-03 00:09:54 +03:00
check_unused.rs deduplicate more walk_* methods in AST visit 2025-06-06 04:59:26 +00:00
def_collector.rs Don't give APITs names with macro expansion placeholder fragments in it 2025-06-25 15:42:11 +00:00
diagnostics.rs Rollup merge of #142730 - bend-n:suggest_declaring_modules_when_file_found_but_module_not_defined, r=petrochenkov 2025-06-27 22:13:02 +02:00
effective_visibilities.rs Reorder ast::ItemKind::{Struct,Enum,Union} fields. 2025-05-28 15:48:45 +10:00
errors.rs Add runtime check to avoid overwrite arg easily in diag and store and restore snapshot when set subdiag arg 2025-06-25 21:07:16 +08:00
ident.rs Detect when attribute is provided by missing derive macro 2025-06-12 21:28:49 +00:00
imports.rs Emit a single error when importing a path with _ 2025-06-24 16:21:26 +00:00
late.rs Auto merge of #142706 - fee1-dead-contrib:push-zsznlqyrzsqo, r=oli-obk 2025-06-22 14:03:44 +00:00
lib.rs Don't give APITs names with macro expansion placeholder fragments in it 2025-06-25 15:42:11 +00:00
macros.rs Don't give APITs names with macro expansion placeholder fragments in it 2025-06-25 15:42:11 +00:00
rustdoc.rs Improve code and documentation 2025-06-23 16:12:49 +02:00