Rollup merge of #79105 - petrochenkov:winlink, r=shepmaster
Rollup merge of #79105 - petrochenkov:winlink, r=shepmaster

std: Fix test `symlink_hard_link` on Windows

The test was introduced in https://github.com/rust-lang/rust/pull/78026 and fails depending on Windows version and admin rights.
Other similar tests check for symlink creation permissions before doing anything, this PR performs the same check for `symlink_hard_link` as well.

aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust