about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/doc-examples-json.rs
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2020-08-17 20:20:25 -0700
committerGitHub <noreply@github.com>2020-08-17 20:20:25 -0700
commitd6ff46c3be06a003785059b1cc166c0969ac2ddd (patch)
tree55f8d1d1dbc301eafbb2aff3b4bb6a899077f081 /src/test/rustdoc-ui/coverage/doc-examples-json.rs
parentd7dcae03c9c014362cdefb7ec605bb35804a6a94 (diff)
parent6ad6d8c25c399cdc001ca65801017e8c5c51e9e2 (diff)
downloadrust-d6ff46c3be06a003785059b1cc166c0969ac2ddd.tar.gz
rust-d6ff46c3be06a003785059b1cc166c0969ac2ddd.zip
Rollup merge of #75548 - dancrossnyc:master, r=tmandry
librustc_metadata::locator: Properly detect file type.

Make sure to test file types against the non-canonicalized name to
avoid detecting the wrong type.  Some systems save build artifacts
into associate 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 tntroduce 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 mainter who sees a
potential cleanup.

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