]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #85344 - cbeuw:remap-across-cwd, r=michaelwoerister
authorbors <bors@rust-lang.org>
Wed, 25 Aug 2021 10:58:43 +0000 (10:58 +0000)
committerbors <bors@rust-lang.org>
Wed, 25 Aug 2021 10:58:43 +0000 (10:58 +0000)
commit958d788a0b0cac81a0150c277b84746798f97b7d
tree3e308052e8bb27b6ff0f89b49c6d44630c425908
parent9863bf51a52b8e61bcad312f81b5193d53099f9f
parent7ed9f2e6aa1e38ff43c0fe56bd9afc7f8aec28ba
Auto merge of #85344 - cbeuw:remap-across-cwd, r=michaelwoerister

Correctly handle remapping from path containing the current directory with trailing paths

If we have a `auxiliary/lib.rs`, and we generate the metadata with `--remap-path-prefix $PWD/auxiliary=xyz`, the path to `$PWD/auxiliary/lib.rs` won't be correctly remapped in the metadata. This is because internally, path to the working directory itself and relative paths to files under the working directory are remapped separately (hence neither are affected since neither has `$PWD/auxiliary` as prefix), but the concatenation between the working directory and the relative path is not remapped. This PR fixes that.
compiler/rustc_metadata/src/rmeta/encoder.rs