pub fn compiled_source_files(
workspace: &Path,
target_directory: &Path,
) -> Option<BTreeSet<String>>Expand description
The workspace sources the build actually read, from the depinfo rustc
writes beside every artifact (<artifact>.d: a make rule whose
prerequisites are every file that went into it). None when no depinfo
could be read, which means “do not prune”.
Source discovery follows mod declarations because that is what rustc
RESOLVES; this is what it COMPILES. A module behind a #[cfg] that is off
is resolved and never built, and its obligations can never be covered –
smallvec’s serde, borsh, rayon and specialization modules are 142
such lines. Reading the build is exact for every cfg predicate, where
evaluating them here would have to reproduce Cargo’s feature resolution.