diff options
| author | bors <bors@rust-lang.org> | 2022-04-15 15:47:17 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-15 15:47:17 +0000 | 
| commit | 1e6fe5855a115ef7f17f3e17205fab7340775701 (patch) | |
| tree | 10d4001f37a7a8f4780f878f9d72f9e60fc9ad73 /library/std/src/sys/unix/pipe.rs | |
| parent | 69a5ae35fe5bb507ca5987e12392dce5186480b9 (diff) | |
| parent | f62c84e6b9b9720c2a49279843029b1c50fec54e (diff) | |
| download | rust-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/pipe.rs')
0 files changed, 0 insertions, 0 deletions
