diff options
| author | bors <bors@rust-lang.org> | 2024-09-09 18:53:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-09-09 18:53:06 +0000 |
| commit | c2f74c3f928aeb503f15b4e9ef5778e77f3058b8 (patch) | |
| tree | fb95aea0cb40f76209cd354496a90ba6391d9c6c /library/std/src | |
| parent | d7522d872601c5243899a813728a05cde1e5a8e2 (diff) | |
| parent | a0346bbd31110e5f269ce1f3e5a794131d48359a (diff) | |
| download | rust-c2f74c3f928aeb503f15b4e9ef5778e77f3058b8.tar.gz rust-c2f74c3f928aeb503f15b4e9ef5778e77f3058b8.zip | |
Auto merge of #130165 - matthiaskrgr:rollup-fsnmz3t, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #129929 (`rustc_mir_transform` cleanups, round 2) - #130022 (Dataflow/borrowck lifetime cleanups) - #130064 (fix ICE in CMSE type validation) - #130067 (Remove redundant check in `symlink_hard_link` test) - #130131 (Print a helpful message if any tests were skipped for being up-to-date) - #130137 (Fix ICE caused by missing span in a region error) - #130153 (use verbose flag as a default value for `rust.verbose-tests`) - #130154 (Stabilize `char::MIN`) - #130158 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/fs/tests.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 13028c4c3b5..fb8dd2b0ca1 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -1,7 +1,5 @@ use rand::RngCore; -#[cfg(target_os = "macos")] -use crate::ffi::{c_char, c_int}; use crate::fs::{self, File, FileTimes, OpenOptions}; use crate::io::prelude::*; use crate::io::{BorrowedBuf, ErrorKind, SeekFrom}; @@ -16,8 +14,6 @@ use crate::os::unix::fs::symlink as junction_point; use crate::os::windows::fs::{junction_point, symlink_dir, symlink_file, OpenOptionsExt}; use crate::path::Path; use crate::sync::Arc; -#[cfg(target_os = "macos")] -use crate::sys::weak::weak; use crate::sys_common::io::test::{tmpdir, TempDir}; use crate::time::{Duration, Instant, SystemTime}; use crate::{env, str, thread}; @@ -80,17 +76,6 @@ pub fn got_symlink_permission(tmpdir: &TempDir) -> bool { } } -#[cfg(target_os = "macos")] -fn able_to_not_follow_symlinks_while_hard_linking() -> bool { - weak!(fn linkat(c_int, *const c_char, c_int, *const c_char, c_int) -> c_int); - linkat.get().is_some() -} - -#[cfg(not(target_os = "macos"))] -fn able_to_not_follow_symlinks_while_hard_linking() -> bool { - return true; -} - #[test] fn file_test_io_smoke_test() { let message = "it's alright. have a good time"; @@ -1456,9 +1441,6 @@ fn symlink_hard_link() { if !got_symlink_permission(&tmpdir) { return; }; - if !able_to_not_follow_symlinks_while_hard_linking() { - return; - } // Create "file", a file. check!(fs::File::create(tmpdir.join("file"))); |
