suggest declaring modules when file found but module not defined by bend-n · Pull Request #142730 · rust-lang/rust (original) (raw)

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

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:

= help: you may have forgotten to declare the module `thing`. use `mod thing` in this file to declare this module.