File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 1- #![ allow( dead_code) ]
2-
31use crate :: alloc:: { GlobalAlloc , Layout , System } ;
42use crate :: cmp;
53use crate :: ptr;
Original file line number Diff line number Diff line change 1+ // This module contains code that is shared between all platforms, mostly utility or fallback code.
2+ // This explicitly does not include code that is shared between only a few platforms,
3+ // such as when reusing an implementation from `unix` or `unsupported`.
4+ // In those cases the desired code should be included directly using the #[path] attribute,
5+ // not moved to this module.
6+ //
7+ // Currently `sys_common` contains a lot of code that should live in this module,
8+ // ideally `sys_common` would only contain platform-independent abstractions on top of `sys`.
9+ // Progress on this is tracked in #84187.
10+
11+ #![ allow( dead_code) ]
12+
113pub mod alloc;
Original file line number Diff line number Diff line change 88//! rest of `std` is complex, with dependencies going in all
99//! directions: `std` depending on `sys_common`, `sys_common`
1010//! depending on `sys`, and `sys` depending on `sys_common` and `std`.
11- //! Ideally `sys_common` would be split into two and the dependencies
12- //! between them all would form a dag, facilitating the extraction of
13- //! `std::sys` from the standard library.
11+ //! This is because `sys_common` not only contains platform-independent code,
12+ //! but also code that is shared between the different platforms in `sys`.
13+ //! Ideally all that shared code should be moved to `sys::common`,
14+ //! and the dependencies between `std`, `sys_common` and `sys` all would form a dag.
15+ //! Progress on this is tracked in #84187.
1416
1517#![ allow( missing_docs) ]
1618#![ allow( missing_debug_implementations) ]
You can’t perform that action at this time.
0 commit comments