Feature gate: #![feature(c_str_module)]
This is a tracking issue for the std::ffi::c_str module.
Public API
This adds {core, alloc, std}::ffi::c_str modules and migrates some existing types into them. Types will still be re-exported in their current places to ensure compatibility.
The following migrations are made:
core::ffi::CStr => core::ffi::c_str::CStr
core::ffi::FromBytesUntilNulError => core::ffi::c_str::FromBytesUntilNulError
core::ffi::FromBytesWithNulError => core::ffi::c_str::FromBytesWithNulError
alloc::ffi::CString => alloc::ffi::c_str::CString
alloc::ffi::FromVecWIthNulError => alloc::ffi::c_str::FromVecWIthNulError
alloc::ffi::IntoStringError => alloc::ffi::c_str::IntoStringError
alloc::ffi::NulError => alloc::ffi::c_str::NulError
And these types are also migrated on the std crate as well.
Steps / History
Unresolved Questions
Feature gate:
#![feature(c_str_module)]This is a tracking issue for the
std::ffi::c_strmodule.Public API
This adds
{core, alloc, std}::ffi::c_strmodules and migrates some existing types into them. Types will still be re-exported in their current places to ensure compatibility.The following migrations are made:
core::ffi::CStr=>core::ffi::c_str::CStrcore::ffi::FromBytesUntilNulError=>core::ffi::c_str::FromBytesUntilNulErrorcore::ffi::FromBytesWithNulError=>core::ffi::c_str::FromBytesWithNulErroralloc::ffi::CString=>alloc::ffi::c_str::CStringalloc::ffi::FromVecWIthNulError=>alloc::ffi::c_str::FromVecWIthNulErroralloc::ffi::IntoStringError=>alloc::ffi::c_str::IntoStringErroralloc::ffi::NulError=>alloc::ffi::c_str::NulErrorAnd these types are also migrated on the
stdcrate as well.Steps / History
std::ffi::candstd::ffi::ossubmodules libs-team#134Unresolved Questions
c_strandc_stringbe separated? This was not discussed in the original ACP. Decision: no.Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/api-change-proposals.html ↩
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩