about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/json.rs
diff options
context:
space:
mode:
authorDan Cross <dcross@google.com>2020-08-14 20:29:04 -0400
committerDan Cross <dcross@google.com>2020-08-17 13:23:29 -0400
commit6ad6d8c25c399cdc001ca65801017e8c5c51e9e2 (patch)
tree08919bb4238e6ce83a1ea1c8e949445bbdbd3c79 /src/test/rustdoc-ui/coverage/json.rs
parente8df0b893235aa06c6362d1a8646296310f79f81 (diff)
downloadrust-6ad6d8c25c399cdc001ca65801017e8c5c51e9e2.tar.gz
rust-6ad6d8c25c399cdc001ca65801017e8c5c51e9e2.zip
librustc_metadata::locator: Properly detect file type.
Make sure to test for file types against the non-canonicalized name
to avoid detecting the wrong type.  Some systems save build artifacts
into associative file stores that do not preserve extensions, and
then link to those using conventionally-named symbolic links that
are the arguments to `rustc` et al.  If we canonicalize before
testing the type, we resolve the symlink, the extension is lost and
we might treat rlibs and rmetas as dylibs.

The fix is to introduce a temporary to hold the canonicalized name,
compare against the non-canonical name, and add a comment
explaining what's going on for the would-be maintainer who sees a
potential cleanup.

Signed-off-by: Dan Cross <dcross@google.com>
Diffstat (limited to 'src/test/rustdoc-ui/coverage/json.rs')
0 files changed, 0 insertions, 0 deletions