Rename rustc_mir_build::build to builder by Zalathar · Pull Request #134365 · rust-lang/rust (original) (raw)

GitHub's “Go to file” feature silently ignores all files in this module, presumably because they are in a directory named build, which is mistaken for a build-output directory. That makes it meaningfully harder to view those files and their history via GitHub.

This PR sidesteps that issue by renaming build to builder, which in context has basically the same meaning, but can't be mistaken for a build-output directory.


Extracted from #133404, after #133592 changed the .gitignore rule from build/ to /build. The problem of GitHub ignoring these files still exists even after that change, which suggests that GitHub's behaviour is a hard-coded heuristic that isn't influenced by the repository's git settings.

Currently this PR doesn't include the tidy rule forbidding build as a module name, but that could be added if people think it's a good idea.