Open
Description
Originally proposed in rust-lang/rust#28711, attempted as a clippy lint in https://github.com/Manishearth/rust-clippy/pull/544. The clippy lint is not really feasible, since it requires knowledge about all other files in the project (main.rs
and lib.rs
don't know about each other, since they are of different rustc invocations).
Cargo could invoke rustc with --emit dep-info
and compile a list of all files mentioned in the resulting .d
file. Then, once all required files are collected, it could check that list against the .rs
files in the src (and test?) folders and notify the user of any extra files that aren't used in any compilation.
Activity