Uh oh!
There was an error while loading. Please reload this page.
std: Stabilize the ffi module - #22975
Conversation
rust-highfive
commented
Mar 2, 2015
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
commented
Mar 2, 2015
r? @aturon |
alexcrichton
commented
Mar 2, 2015
mzabaluev
commented
Mar 2, 2015
In rust-lang/rfcs#912 it was proposed to change (and perhaps rename) |
There was a problem hiding this comment.
While not currently recognized by the compiler I've found it useful to see reexports tagged with stability attributes for rustdoc when it doesn't inline documentation and perhaps just helpful when reading code. It doesn't currently serve any semantic purpose though.
bors
commented
Mar 3, 2015
☔ The latest upstream changes (presumably #22995) made this pull request unmergeable. Please resolve the merge conflicts. |
alexcrichton
commented
Mar 3, 2015
@mzabaluev thanks for taking a look! Due to the unstable-ness of |
alexcrichton
commented
Mar 4, 2015
There was a problem hiding this comment.
We're moving away from public tuple structs in std; this should probably be a normal struct with accessors.
There was a problem hiding this comment.
(I always forget that, unlike enum variants, the pub doesn't automatically extend to tuple components...)
aturon
commented
Mar 5, 2015
@alexcrichton Meanwhile, it seemed ok to stabilize I wonder if type ascription would change the tradeoff at all? In particular, we were worried about cases involving null to-from In any case, I think it's fine to stabilize this for now, because any reference-based replacement would likely want a different name and lead to deprecation of this method. If that happens before 1.0, all the better. Otherwise, r=me. |
alexcrichton
commented
Mar 5, 2015
@bors: r=aturon 6ab4938 |
The two main sub-modules, `c_str` and `os_str`, have now had some time to bake in the standard library. This commits performs a sweep over the modules adding various stability tags. The following APIs are now marked `#[stable]` * `OsString` * `OsStr` * `OsString::from_string` * `OsString::from_str` * `OsString::new` * `OsString::into_string` * `OsString::push` (renamed from `push_os_str`, added an `AsOsStr` bound) * various trait implementations for `OsString` * `OsStr::from_str` * `OsStr::to_str` * `OsStr::to_string_lossy` * `OsStr::to_os_string` * various trait implementations for `OsStr` * `CString` * `CStr` * `NulError` * `CString::new` - this API's implementation may change as a result of rust-lang/rfcs#912 but the usage of `CString::new(thing)` looks like it is unlikely to change. Additionally, the `IntoBytes` bound is also likely to change but the set of implementors for the trait will not change (despite the trait perhaps being renamed). * `CString::from_vec_unchecked` * `CString::as_bytes` * `CString::as_bytes_with_nul` * `NulError::nul_position` * `NulError::into_vec` * `CStr::from_ptr` * `CStr::as_ptr` * `CStr::to_bytes` * `CStr::to_bytes_with_nul` * various trait implementations for `CStr` The following APIs remain `#[unstable]` * `OsStr*Ext` traits remain unstable as the organization of `os::platform` is uncertain still and the traits may change location. * `AsOsStr` remains unstable as generic conversion traits are likely to be rethought soon. The following APIs were deprecated * `OsString::push_os_str` is now called `push` and takes `T: AsOsStr` instead (a superset of the previous functionality).
alexcrichton
commented
Mar 5, 2015
Conflicts: src/librustc_trans/back/link.rs src/librustc_trans/lib.rs
The two main sub-modules,
c_strandos_str, have now had some time to bakein the standard library. This commits performs a sweep over the modules adding
various stability tags.
The following APIs are now marked
#[stable]OsStringOsStrOsString::from_stringOsString::from_strOsString::newOsString::into_stringOsString::push(renamed frompush_os_str, added anAsOsStrbound)OsStringOsStr::from_strOsStr::to_strOsStr::to_string_lossyOsStr::to_os_stringOsStrCStringCStrNulErrorCString::new- this API's implementation may change as a result ofRFC: improve CString construction methods rfcs#912 but the usage of
CString::new(thing)looks like it isunlikely to change. Additionally, the
IntoBytesbound is also likely tochange but the set of implementors for the trait will not change (despite the
trait perhaps being renamed).
CString::from_vec_uncheckedCString::as_bytesCString::as_bytes_with_nulNulError::nul_positionNulError::into_vecCStr::from_ptrCStr::to_bytesCStr::to_bytes_with_nulCStrThe following APIs remain
#[unstable]OsStr*Exttraits remain unstable as the organization ofos::platformisuncertain still and the traits may change location.
AsOsStrremains unstable as generic conversion traits are likely to berethought soon.
The following APIs were deprecated
OsString::push_os_stris now calledpushand takesT: AsOsStrinstead (asuperset of the previous functionality).
[breaking-change]