See [here](https://github.com/rust-lang/rust/pull/131560#issuecomment-2408863576), which was already the second time that the logic caused trouble in less than a week (first time was fixed [here](https://github.com/rust-lang/rust/pull/131434)). I don't think a list of "folders that can influence the build" is maintainable. At the very least it'd have to include `src/bootstrap` since that computes a ton of env vars and flags that influence the build. Judging from some of the comments that are hidden in the huge thread of https://github.com/rust-lang/rust/pull/122709, one motivation here is to prepare for a planned bootstrap change where rustc is built with the beta `std`. Is that the key motivation? Would be good to get that clarified. I would argue that the way to achieve this goal is to have an allowlist of "folders where changes are okay", not a denylist of "folders where changes lead to redowload". That allowlist would contain `library/` once the bootstrap change is made. For now, it is not clear to me what we can add to the allowlist... maybe `src/doc` and `src/tools`? `src/tools/build-helper` does have the chance to influence the build, but it shouldn't contain any actual logic, so it's "probably fine".