From 905d23b65c07a1da4452f9a20b1891fc46533fb7 Mon Sep 17 00:00:00 2001 From: Christiaan Dirkx Date: Wed, 24 Feb 2021 19:16:24 +0100 Subject: [PATCH] Move `std::sys_common::alloc` to `std::sys::common` --- library/std/src/{sys_common => sys/common}/alloc.rs | 0 library/std/src/sys/common/mod.rs | 1 + library/std/src/sys/mod.rs | 2 ++ library/std/src/sys/unix/alloc.rs | 2 +- library/std/src/sys/windows/alloc.rs | 2 +- library/std/src/sys_common/mod.rs | 1 - 6 files changed, 5 insertions(+), 3 deletions(-) rename library/std/src/{sys_common => sys/common}/alloc.rs (100%) create mode 100644 library/std/src/sys/common/mod.rs diff --git a/library/std/src/sys_common/alloc.rs b/library/std/src/sys/common/alloc.rs similarity index 100% rename from library/std/src/sys_common/alloc.rs rename to library/std/src/sys/common/alloc.rs diff --git a/library/std/src/sys/common/mod.rs b/library/std/src/sys/common/mod.rs new file mode 100644 index 00000000000..920965d5944 --- /dev/null +++ b/library/std/src/sys/common/mod.rs @@ -0,0 +1 @@ +pub mod alloc; diff --git a/library/std/src/sys/mod.rs b/library/std/src/sys/mod.rs index 9b359392cf0..50c2660ebcf 100644 --- a/library/std/src/sys/mod.rs +++ b/library/std/src/sys/mod.rs @@ -22,6 +22,8 @@ #![allow(missing_debug_implementations)] +mod common; + cfg_if::cfg_if! { if #[cfg(target_os = "vxworks")] { mod vxworks; diff --git a/library/std/src/sys/unix/alloc.rs b/library/std/src/sys/unix/alloc.rs index 964abe8b8c9..1b71905aa09 100644 --- a/library/std/src/sys/unix/alloc.rs +++ b/library/std/src/sys/unix/alloc.rs @@ -1,6 +1,6 @@ use crate::alloc::{GlobalAlloc, Layout, System}; use crate::ptr; -use crate::sys_common::alloc::{realloc_fallback, MIN_ALIGN}; +use crate::sys::common::alloc::{realloc_fallback, MIN_ALIGN}; #[stable(feature = "alloc_system_type", since = "1.28.0")] unsafe impl GlobalAlloc for System { diff --git a/library/std/src/sys/windows/alloc.rs b/library/std/src/sys/windows/alloc.rs index af93cd7a3e2..2fe71f9f28d 100644 --- a/library/std/src/sys/windows/alloc.rs +++ b/library/std/src/sys/windows/alloc.rs @@ -5,7 +5,7 @@ use crate::ptr; use crate::sync::atomic::{AtomicPtr, Ordering}; use crate::sys::c; -use crate::sys_common::alloc::{realloc_fallback, MIN_ALIGN}; +use crate::sys::common::alloc::{realloc_fallback, MIN_ALIGN}; #[cfg(test)] mod tests; diff --git a/library/std/src/sys_common/mod.rs b/library/std/src/sys_common/mod.rs index 660f0e0df97..9700d1f6daa 100644 --- a/library/std/src/sys_common/mod.rs +++ b/library/std/src/sys_common/mod.rs @@ -46,7 +46,6 @@ macro_rules! rtunwrap { }; } -pub mod alloc; pub mod at_exit_imp; pub mod backtrace; pub mod bytestring;