Hm it won’t be too hard but I think it will be nontrivial.
We’ve already got dependency checking which verifies license, so it should be mostly just adding an array next to EXCEPTIONS
for a whitelist (and then checking the names of directories and such). The trick is that we only want to verify the dependencies of rustc itself, so we’d have to run cargo metadata
to learn about the dependency graph. The build system already does that though so the logic could perhaps just be moved there.