Skip to content

Commit d7a9e47

Browse files
committed
Merge Apple std::os extensions modules
1 parent b14d8b2 commit d7a9e47

File tree

15 files changed

+23
-773
lines changed

15 files changed

+23
-773
lines changed

library/std/src/os/macos/fs.rs renamed to library/std/src/os/apple/fs.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::sys_common::{AsInner, AsInnerMut, IntoInner};
66
use crate::time::SystemTime;
77

88
#[allow(deprecated)]
9-
use crate::os::macos::raw;
9+
use super::raw;
1010

1111
/// OS-specific extensions to [`fs::Metadata`].
1212
///
@@ -70,6 +70,7 @@ pub trait MetadataExt {
7070
fn st_gen(&self) -> u32;
7171
#[stable(feature = "metadata_ext2", since = "1.8.0")]
7272
fn st_lspare(&self) -> u32;
73+
#[cfg(target_os = "macos")]
7374
#[stable(feature = "metadata_ext2", since = "1.8.0")]
7475
fn st_qspare(&self) -> [u64; 2];
7576
}
@@ -143,6 +144,7 @@ impl MetadataExt for Metadata {
143144
fn st_lspare(&self) -> u32 {
144145
self.as_inner().as_inner().st_lspare as u32
145146
}
147+
#[cfg(target_os = "macos")]
146148
fn st_qspare(&self) -> [u64; 2] {
147149
let qspare = self.as_inner().as_inner().st_qspare;
148150
[qspare[0] as u64, qspare[1] as u64]

library/std/src/os/apple/mod.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#![cfg_attr(target_os = "ios", doc = "iOS-specific definitions")]
2+
#![cfg_attr(target_os = "macos", doc = "macOS-specific definitions")]
3+
#![cfg_attr(target_os = "tvos", doc = "tvOS-specific definitions")]
4+
#![cfg_attr(target_os = "visionos", doc = "visionOS-specific definitions")]
5+
#![cfg_attr(target_os = "watchos", doc = "watchOS-specific definitions")]
6+
#![stable(feature = "raw_ext", since = "1.1.0")]
7+
8+
pub mod fs;
9+
pub mod raw;

library/std/src/os/visionos/raw.rs renamed to library/std/src/os/apple/raw.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
//! visionos-specific raw type definitions
2-
1+
#![cfg_attr(target_os = "ios", doc = "iOS-specific raw type definitions")]
2+
#![cfg_attr(target_os = "macos", doc = "macOS-specific raw type definitions")]
3+
#![cfg_attr(target_os = "tvos", doc = "tvOS-specific raw type definitions")]
4+
#![cfg_attr(target_os = "visionos", doc = "visionOS-specific raw type definitions")]
5+
#![cfg_attr(target_os = "watchos", doc = "watchOS-specific raw type definitions")]
36
#![stable(feature = "raw_ext", since = "1.1.0")]
47
#![deprecated(
58
since = "1.8.0",

library/std/src/os/ios/fs.rs

-160
This file was deleted.

library/std/src/os/ios/mod.rs

-6
This file was deleted.

library/std/src/os/ios/raw.rs

-83
This file was deleted.

library/std/src/os/macos/mod.rs

-6
This file was deleted.

library/std/src/os/macos/raw.rs

-83
This file was deleted.

0 commit comments

Comments
 (0)