pub fn in_build_directory(exe: &Path) -> boolExpand description
Whether this executable is sitting in a cargo build directory.
A unit pointing into one breaks at the next cargo clean, and it
breaks at reboot — the moment nobody is watching. Detected by the
profile directory cargo actually writes into rather than by looking
for a component called target: CARGO_TARGET_DIR renames that one,
and the first version of this check was defeated by a target
directory called anything else.