rustcuses thePathhash code to identify files, and thePathhash implementation is particularly weak because it ignores separators. As of PR #127297, it tries to compensate by mixing the component lengths into the hash, but it's still easy to manufacture collisions. That includes collisions where both sides look like plausible source paths, not gibberish, e.g.data/baselines/table.rswill conflict withdatabase/line/stable.rs.
When the hash codes of two paths collide,rustcsubstitutes the first file's contents when compiling the second one.
Rust issue
Из-за небольшого смешивания стейта просто совпадения текста без сепараторов недостаточно, нужно ещё, чтобы звёзды сошлись по длине компонентов.