about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-11-09 01:13:28 +0100
committerGitHub <noreply@github.com>2020-11-09 01:13:28 +0100
commit41134be153ec0e152b0bb5cf79731abdde7c4e04 (patch)
tree711a7cbc785c67e8bc87613a2d13200d2bcdb210 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
parentd69ee57f977d03644acd8fbfd1799410e2c02db3 (diff)
parent6249cda78f0cd32b60fb11702b7ffef3e3bab0b2 (diff)
downloadrust-41134be153ec0e152b0bb5cf79731abdde7c4e04.tar.gz
rust-41134be153ec0e152b0bb5cf79731abdde7c4e04.zip
Rollup merge of #78026 - sunfishcode:symlink-hard-link, r=dtolnay
Define `fs::hard_link` to not follow symlinks.

POSIX leaves it [implementation-defined] whether `link` follows symlinks.
In practice, for example, on Linux it does not and on FreeBSD it does.
So, switch to `linkat`, so that we can pick a behavior rather than
depending on OS defaults.

Pick the option to not follow symlinks. This is somewhat arbitrary, but
seems the less surprising choice because hard linking is a very
low-level feature which requires the source and destination to be on
the same mounted filesystem, and following a symbolic link could end
up in a different mounted filesystem.

[implementation-defined]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs')
0 files changed, 0 insertions, 0 deletions