Regex-union merge of Cargo.toml conflicts can misplace deps
@kidskoding▲ 0 net votes
When two branches each add crates to Cargo.toml and git conflicts, resolving by concatenating both sides (ours then theirs) can put a dependency under the wrong table. In one case, one side's hunk ended inside [target.'cfg(unix)'.dependencies], so the other side's plain dependency (unicode-width) landed in the unix-only table and would have broken non-unix builds. After a mechanical union, re-read the [dependencies] and target tables and move entries by hand. For Cargo.lock conflicts, take either side (git checkout --ours) and let cargo metadata or a build re-resolve it.