diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 77be07b097b03..4c2e079a7b0bc 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -2872,7 +2872,7 @@ pub fn copy, Q: AsRef>(from: P, to: Q) -> io::Result { /// /// This function currently corresponds to the `CreateHardLink` function on Windows. /// On most Unix systems, it corresponds to the `linkat` function with no flags. -/// On Android, VxWorks, and Redox, it instead corresponds to the `link` function. +/// On VxWorks and Redox, it instead corresponds to the `link` function. /// On MacOS, it uses the `linkat` function if it is available, but on very old /// systems where `linkat` is not available, `link` is selected at runtime instead. /// Note that, this [may change in the future][changes]. diff --git a/library/std/src/sys/fs/unix.rs b/library/std/src/sys/fs/unix.rs index 7283e8f710c55..64abe7e478523 100644 --- a/library/std/src/sys/fs/unix.rs +++ b/library/std/src/sys/fs/unix.rs @@ -2057,9 +2057,6 @@ pub fn link(original: &CStr, link: &CStr) -> io::Result<()> { target_os = "vxworks", target_os = "redox", target_os = "espidf", - // Android has `linkat` on newer versions, but we happen to know - // `link` always has the correct behavior, so it's here as well. - target_os = "android", // Other misc platforms target_os = "horizon", target_os = "vita", diff --git a/src/tools/miri/tests/pass/shims/fs.rs b/src/tools/miri/tests/pass/shims/fs.rs index 90dd5f16189b8..d1c9f99102e64 100644 --- a/src/tools/miri/tests/pass/shims/fs.rs +++ b/src/tools/miri/tests/pass/shims/fs.rs @@ -49,9 +49,8 @@ fn main() { if cfg!(not(windows)) { test_directory(); test_canonicalize(); - #[cfg(not(target_os = "solaris"))] + #[cfg(not(target_os = "solaris"))] // does not have flock test_flock(); - #[cfg(not(target_os = "android"))] test_hard_link(); test_readv_writev(); @@ -559,8 +558,6 @@ fn test_preadv_pwritev() { assert_eq!(written_bytes.as_slice(), &write_buffer[0..bytes_written]); } -// std uses `libc::link` on Android which we do not support. -#[cfg(not(target_os = "android"))] fn test_hard_link() { let source = utils::prepare_with_content("miri_test_fs_hard_link_source.txt", b"hello"); let link = utils::prepare("miri_test_fs_hard_link_link.txt");