about summary refs log tree commit diff
path: root/src/libstd/ffi
AgeCommit message (Collapse)AuthorLines
2017-09-25Overhaul the ffi::CStr documentation.Federico Mena Quintero-30/+46
2017-09-25Overhaul the ffi::CString docsFederico Mena Quintero-31/+115
Explain the struct's reason for being, and its most common usage patterns. Add a bunch of links. Clarify the method docs a bit. Part of https://github.com/rust-lang/rust/issues/29354
2017-09-25Expand the introduction to the ffi module.Federico Mena Quintero-1/+100
We describe the representation of C strings, and the purpose of OsString/OsStr. Part of https://github.com/rust-lang/rust/issues/29354
2017-09-10Use rvalue promotion to 'static instead of static items.Eduard-Mihai Burtescu-1/+1
2017-08-15Fix typos & us spellingsFourchaux-2/+2
2017-07-25std: Stabilize the `str_{mut,box}_extras` featureAlex Crichton-8/+0
Stabilizes * `<&mut str>::as_bytes_mut` * `<Box<str>>::into_boxed_bytes` * `std::str::from_boxed_utf8_unchecked` * `std::str::from_utf8_mut` * `std::str::from_utf8_unchecked_mut` Closes #41119
2017-07-25std: Stabilize CString/OsString/PathBuf extra methodsAlex Crichton-5/+5
Stabilizes: * `CString::as_c_str` * `CString::into_boxed_c_str` * `CStr::into_c_string` * `OsString::into_boxed_os_str` * `OsStr::into_os_string` * `PathBuf::into_boxed_path` * `PathBuf::into_path_buf` Closes #40380
2017-07-04Rollup merge of #42227 - ollie27:into_to_from, r=aturonMark Simulacrum-8/+8
Convert Intos to Froms. This is a resubmission of #42129 without `impl<T> From<Vec<T>> for Box<[T]>`.
2017-06-28Auto merge of #42745 - sfackler:1.19-stabilization, r=alexcrichtonbors-3/+1
1.19 stabilization r? @alexcrichton
2017-06-25Reword OsStr docs to clarify that utf8 may contain nullsCasey Rodarmor-1/+1
2017-06-24Stabilize OsString::shrink_to_fitSteven Fackler-3/+1
Closes #40421
2017-06-21Update version numbers for From implsOliver Middleton-2/+2
2017-06-21Convert Intos to Froms.Clar Charr-6/+6
2017-06-20Add doc example for `CString::from_raw`.Corey Farwell-0/+21
2017-06-20Add doc example for `FromBytesWithNulError`.Corey Farwell-0/+8
2017-06-20Add doc example for `NulError`.Corey Farwell-0/+8
2017-06-20Add doc example for `CStr::to_str`.Corey Farwell-0/+9
2017-06-20Add doc example for `CString::as_c_str`.Corey Farwell-0/+12
2017-06-20Add doc example for `Box<CStr>::into_c_string`.Corey Farwell-0/+12
2017-06-20Add doc example for `CString::into_boxed_c_str`.Corey Farwell-0/+12
2017-06-20Add doc example for `CStr::to_string_lossy`.Corey Farwell-0/+25
2017-06-20Add error scenario doc examples for `CStr::from_bytes_with_nul`.Corey Farwell-0/+18
2017-06-20Add doc example for `CStr::to_bytes_with_nul`.Corey Farwell-0/+9
2017-06-20Add doc example for `CStr::to_bytes`.Corey Farwell-0/+9
2017-06-20Mark smaller CStr and CString functions as #[inline]Alexander Bulaev-0/+15
2017-06-15Avoid allocations in Debug for os_strStepan Koltsov-6/+12
Fixes #38879
2017-06-05Add doc example for `CString::as_bytes`.Corey Farwell-0/+10
2017-06-05Add doc example for `CString::as_bytes_with_nul`.Corey Farwell-0/+10
2017-06-05Add doc example for `CString::into_bytes_with_nul`.Corey Farwell-0/+10
2017-06-05Add doc example for `CString::into_bytes`.Corey Farwell-0/+10
2017-06-05Add doc example for `CString::into_raw`.Corey Farwell-0/+20
2017-05-24Add missing urls for OsStr docsGuillaume Gomez-3/+9
2017-05-22Add missing links for CStr and CStringGuillaume Gomez-30/+74
2017-05-20Remove unused lifetimes.Clar Charr-1/+1
2017-05-20Correct some stability versionsOliver Middleton-4/+4
These were found by running tidy on stable versions of rust and finding features stabilised with the wrong version numbers.
2017-05-09Remove wrong or outdated info from CString docs.Matt Brubeck-6/+4
2017-04-18Override ToOwned::clone_into for Path and OsStrScott McMurray-1/+17
The only non-overridden one remaining is the CStr impl, which cannot be optimized as doing so would break CString's second invariant.
2017-04-09Auto merge of #41095 - clarcharr:as_extras, r=alexcrichtonbors-0/+6
Add as_c_str Again, tying up some consistencies with `CString`.
2017-04-07Add as_c_str.Clar Charr-0/+6
2017-04-06Remove some CStr transmutes.Clar Charr-2/+3
2017-03-16Merge branch 'master' into frewsxcv-osstrCorey Farwell-14/+53
2017-03-15Auto merge of #40009 - clarcharr:box_to_buf, r=alexcrichtonbors-14/+53
Leftovers from #39594; From<Box> impls These are a few more impls that follow the same reasoning as those from #39594. What's included: * `From<Box<str>> for String` * `From<Box<[T]>> for Vec<T>` * `From<Box<CStr>> for CString` * `From<Box<OsStr>> for OsString` * `From<Box<Path>> for PathBuf` * `Into<Box<str>> for String` * `Into<Box<[T]>> for Vec<T>` * `Into<Box<CStr>> for CString` * `Into<Box<OsStr>> for OsString` * `Into<Box<Path>> for PathBuf` * `<Box<CStr>>::into_c_string` * `<Box<OsStr>>::into_os_string` * `<Box<Path>>::into_path_buf` * Tracking issue for latter three methods + three from previous PR. Currently, the opposite direction isn't doable with `From` (only `Into`) because of the separation between `liballoc` and `libcollections`. I'm holding off on those for a later PR.
2017-03-14Add doc example for `OsString::into_boxed_os_str`.Corey Farwell-0/+12
2017-03-14Add doc example for `OsString::shrink_to_fit`.Corey Farwell-0/+16
2017-03-14Add doc example for `OsString::reserve_exact`.Corey Farwell-0/+10
2017-03-14Add doc example for `OsString::reserve`.Corey Farwell-0/+10
2017-03-14Add doc example for `OsStr::to_os_string`.Corey Farwell-0/+10
2017-03-10Rollup merge of #40410 - clarcharr:os_string_shrink_to_fit, r=alexcrichtonAlex Crichton-0/+6
OsString::shrink_to_fit. Considering how the other capacity-related methods are there, I found it odd that this one wasn't included. Will create a tracking issue once I get an OK on this.
2017-03-10Add From<Box<..>> implementations.Clar Charr-14/+53
2017-03-10OsString::shrink_to_fit.Clar Charr-0/+6