diff options
| author | bors <bors@rust-lang.org> | 2024-01-06 06:00:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-06 06:00:27 +0000 |
| commit | aa7e9f21e9a058a4822b6cdc19ee88c80cdb3750 (patch) | |
| tree | 66a18845a73790a059b193a87292e6b4c211133d /library/std/src | |
| parent | d62f05b842d94d3bcad4d41d4b81df3949bad7c6 (diff) | |
| parent | 71610e2eb66dbcda5342700c8bfad12f89756054 (diff) | |
| download | rust-aa7e9f21e9a058a4822b6cdc19ee88c80cdb3750.tar.gz rust-aa7e9f21e9a058a4822b6cdc19ee88c80cdb3750.zip | |
Auto merge of #119648 - compiler-errors:rollup-42inxd8, r=compiler-errors
Rollup of 9 pull requests Successful merges: - #119208 (coverage: Hoist some complex code out of the main span refinement loop) - #119216 (Use diagnostic namespace in stdlib) - #119414 (bootstrap: Move -Clto= setting from Rustc::run to rustc_cargo) - #119420 (Handle ForeignItem as TAIT scope.) - #119468 (rustdoc-search: tighter encoding for f index) - #119628 (remove duplicate test) - #119638 (fix cyle error when suggesting to use associated function instead of constructor) - #119640 (library: Fix warnings in rtstartup) - #119642 (library: Fix a symlink test failing on Windows) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/fs/tests.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 12afdef2669..5917bf8df02 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -936,8 +936,10 @@ fn read_link() { } // Check that readlink works with non-drive paths on Windows. let link = tmpdir.join("link_unc"); - check!(symlink_dir(r"\\localhost\c$\", &link)); - assert_eq!(check!(fs::read_link(&link)), Path::new(r"\\localhost\c$\")); + if got_symlink_permission(&tmpdir) { + check!(symlink_dir(r"\\localhost\c$\", &link)); + assert_eq!(check!(fs::read_link(&link)), Path::new(r"\\localhost\c$\")); + }; } let link = tmpdir.join("link"); if !got_symlink_permission(&tmpdir) { |
