about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/asm.rs
diff options
context:
space:
mode:
authorSimon Chopin <simon.chopin@canonical.com>2022-02-11 10:20:32 +0100
committerSimon Chopin <simon.chopin@canonical.com>2022-02-11 10:45:59 +0100
commit3a1ffead36232a759a4dbdc72a5302a8f8722605 (patch)
tree18281a91d6618b2fc36993f97bd711d9f2336458 /compiler/rustc_codegen_llvm/src/asm.rs
parente273fca380c5d28bc32b25ac1a885c61d4c5e75e (diff)
downloadrust-3a1ffead36232a759a4dbdc72a5302a8f8722605.tar.gz
rust-3a1ffead36232a759a4dbdc72a5302a8f8722605.zip
linkchecker: fix panic on directory symlinks
In Debian and Ubuntu, there are some patches that change the rustc/fonts
directory to a symlink to the system fonts. This triggers a latent bug
in linkchecker, as the DirEntry filetype isn't a dir but later on the
file itself, when opened, is one, triggering an unreachable!() clause.

This patch fixes the situation by using std::fs::metadata, which goes
through symlinks.

I'd have added a test case but `tidy` doesn't seem to like symlinks, and
moreover I'm not sure how Git deals with symlinks on Windows.

Signed-off-by: Simon Chopin <simon.chopin@canonical.com>
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/asm.rs')
0 files changed, 0 insertions, 0 deletions