Open
Description
Our --remap-path-prefix
documentation says "The
replacement is purely textual, with no consideration of the current system's
pathname syntax.". But that currently is not the case. Prefix matching is implemented via Path::strip_prefix which can behave quite differently:
`abc` is a prefix of `abc/def`
`abc/.` is a prefix of `abc/def`
`ab` is NOT a prefix of `abc/def`
`abc` is NOT a prefix of `./abc/def`
`./abc` is NOT a prefix of `abc/def`
`./abc` is a prefix of `./abc/def`
It's unclear whether we should update the documentation or change the compiler's behavior.
rustc --version --verbose
:
rustc 1.60.0 (7737e0b5c 2022-04-04)
binary: rustc
commit-hash: 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c
commit-date: 2022-04-04
host: x86_64-unknown-linux-gnu
release: 1.60.0
LLVM version: 14.0.0