Skip to content

Commit 42e1db5

Browse files
authored
Rollup merge of rust-lang#120109 - joboet:move_pal_cmath, r=ChrisDenton
Move cmath into `sys` Part of rust-lang#117276. r? ``@ChrisDenton``
2 parents 042cc72 + f88e643 commit 42e1db5

File tree

15 files changed

+14
-26
lines changed

15 files changed

+14
-26
lines changed

library/std/src/sys/pal/unix/cmath.rs library/std/src/sys/cmath/builtins.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![cfg(not(test))]
2-
31
// These symbols are all defined by `libm`,
42
// or by `compiler-builtins` on unsupported platforms.
53

library/std/src/sys/cmath/mod.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#![cfg(not(test))]
2+
3+
cfg_if::cfg_if! {
4+
if #[cfg(target_os = "windows")] {
5+
mod windows;
6+
pub use windows::*;
7+
} else {
8+
mod builtins;
9+
pub use builtins::*;
10+
}
11+
}

library/std/src/sys/pal/windows/cmath.rs library/std/src/sys/cmath/windows.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![cfg(not(test))]
2-
31
use core::ffi::{c_double, c_float, c_int};
42

53
extern "C" {

library/std/src/sys/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
/// descriptors.
44
mod pal;
55

6-
pub mod os_str;
76
mod personality;
87

8+
pub mod cmath;
9+
pub mod os_str;
10+
911
// FIXME(117276): remove this, move feature implementations into individual
1012
// submodules.
1113
pub use pal::*;

library/std/src/sys/pal/hermit/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ use crate::os::raw::c_char;
1919

2020
pub mod alloc;
2121
pub mod args;
22-
#[path = "../unix/cmath.rs"]
23-
pub mod cmath;
2422
pub mod env;
2523
pub mod fd;
2624
pub mod fs;

library/std/src/sys/pal/sgx/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ mod waitqueue;
1313

1414
pub mod alloc;
1515
pub mod args;
16-
#[path = "../unix/cmath.rs"]
17-
pub mod cmath;
1816
pub mod env;
1917
pub mod fd;
2018
#[path = "../unsupported/fs.rs"]

library/std/src/sys/pal/solid/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ mod itron {
2121
pub mod alloc;
2222
#[path = "../unsupported/args.rs"]
2323
pub mod args;
24-
#[path = "../unix/cmath.rs"]
25-
pub mod cmath;
2624
pub mod env;
2725
// `error` is `pub(crate)` so that it can be accessed by `itron/error.rs` as
2826
// `crate::sys::error`

library/std/src/sys/pal/teeos/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ pub use self::rand::hashmap_random_keys;
1111
pub mod alloc;
1212
#[path = "../unsupported/args.rs"]
1313
pub mod args;
14-
#[path = "../unix/cmath.rs"]
15-
pub mod cmath;
1614
#[path = "../unsupported/env.rs"]
1715
pub mod env;
1816
pub mod locks;

library/std/src/sys/pal/uefi/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
1515
pub mod alloc;
1616
pub mod args;
17-
#[path = "../unix/cmath.rs"]
18-
pub mod cmath;
1917
pub mod env;
2018
#[path = "../unsupported/fs.rs"]
2119
pub mod fs;

library/std/src/sys/pal/unix/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ pub mod weak;
1111
pub mod alloc;
1212
pub mod android;
1313
pub mod args;
14-
#[path = "../unix/cmath.rs"]
15-
pub mod cmath;
1614
pub mod env;
1715
pub mod fd;
1816
pub mod fs;

library/std/src/sys/pal/unsupported/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
pub mod alloc;
44
pub mod args;
5-
#[path = "../unix/cmath.rs"]
6-
pub mod cmath;
75
pub mod env;
86
pub mod fs;
97
pub mod io;

library/std/src/sys/pal/wasi/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ use crate::mem;
2020
#[path = "../unix/alloc.rs"]
2121
pub mod alloc;
2222
pub mod args;
23-
#[path = "../unix/cmath.rs"]
24-
pub mod cmath;
2523
pub mod env;
2624
pub mod fd;
2725
pub mod fs;

library/std/src/sys/pal/wasm/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
pub mod alloc;
2020
#[path = "../unsupported/args.rs"]
2121
pub mod args;
22-
#[path = "../unix/cmath.rs"]
23-
pub mod cmath;
2422
pub mod env;
2523
#[path = "../unsupported/fs.rs"]
2624
pub mod fs;

library/std/src/sys/pal/windows/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub mod compat;
1515
pub mod alloc;
1616
pub mod args;
1717
pub mod c;
18-
pub mod cmath;
1918
pub mod env;
2019
pub mod fs;
2120
pub mod handle;

library/std/src/sys/pal/xous/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
pub mod alloc;
44
#[path = "../unsupported/args.rs"]
55
pub mod args;
6-
#[path = "../unix/cmath.rs"]
7-
pub mod cmath;
86
#[path = "../unsupported/env.rs"]
97
pub mod env;
108
#[path = "../unsupported/fs.rs"]

0 commit comments

Comments
 (0)