about summary refs log tree commit diff
path: root/library/std/src/sys/unix/kernel_copy
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-15 15:47:17 +0000
committerbors <bors@rust-lang.org>2022-04-15 15:47:17 +0000
commit1e6fe5855a115ef7f17f3e17205fab7340775701 (patch)
tree10d4001f37a7a8f4780f878f9d72f9e60fc9ad73 /library/std/src/sys/unix/kernel_copy
parent69a5ae35fe5bb507ca5987e12392dce5186480b9 (diff)
parentf62c84e6b9b9720c2a49279843029b1c50fec54e (diff)
downloadrust-1e6fe5855a115ef7f17f3e17205fab7340775701.tar.gz
rust-1e6fe5855a115ef7f17f3e17205fab7340775701.zip
Auto merge of #94079 - petrochenkov:cstr, r=joshtriplett
library: Move `CStr` to libcore, and `CString` to liballoc

Closes https://github.com/rust-lang/rust/issues/46736

Interesting points:
- Stability:
    - To make `CStr(ing)` from libcore/liballoc unusable without enabling features I had to make these structures unstable, and reexport them from libstd using stable type aliases instead of `pub use` reexports. (Because stability of `use` items is not checked.)
- Relying on target ABI in libcore is ok:
    - https://github.com/rust-lang/rust/pull/94079#issuecomment-1044263371
- `trait CStrExt` (UPDATE: used only in `cfg(bootstrap)` mode, otherwise lang items are used instead)
    - https://github.com/rust-lang/rust/pull/94079#issuecomment-1047863450
- `strlen`
    - https://github.com/rust-lang/rust/pull/94079#issuecomment-1047863450

Otherwise it's just a code move + some minor hackery usual for liballoc in `cfg(test)` mode.
Diffstat (limited to 'library/std/src/sys/unix/kernel_copy')
0 files changed, 0 insertions, 0 deletions