Warn when a file is included from outside the cargo workspace
Author: GuillaumeGomezCreated Sep 17, 2026Updated Sep 17, 2026
LabelsS-needs-designA-new-lint
What it does
Checks that all include[_*]?d files are within the cargo workspace.
Advantage
No release with missing files.
Drawbacks
I'm not sure if cargo can have this information and rustc doesn't have enough information either.
Example
fn main() {
let x = include_str!("/etc/passwd");
}Source: rust-lang/cargo