diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-02 10:46:05 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-05 14:57:01 -0800 |
| commit | 628f5d29c3b93bbd590e08dc2c69f842a18d1231 (patch) | |
| tree | ad05df7b6bcbbc9b26eb5eb243626014add1cedb /src/compiletest | |
| parent | 68740b405404a3f885e388c8d31722797d519c30 (diff) | |
| download | rust-628f5d29c3b93bbd590e08dc2c69f842a18d1231.tar.gz rust-628f5d29c3b93bbd590e08dc2c69f842a18d1231.zip | |
std: Stabilize the `ffi` module
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).
Diffstat (limited to 'src/compiletest')
| -rw-r--r-- | src/compiletest/compiletest.rs | 1 | ||||
| -rw-r--r-- | src/compiletest/runtest.rs | 9 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index b9e6f1842ee..a5d087b6dd2 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -22,7 +22,6 @@ #![feature(unicode)] #![feature(core)] #![feature(path)] -#![feature(os)] #![feature(io)] #![feature(fs)] #![feature(net)] diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 7fb1a436ba3..04714b50fc0 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -20,7 +20,6 @@ use procsrv; use util::logv; use std::env; -use std::ffi::OsStr; use std::fmt; use std::fs::{self, File}; use std::io::BufReader; @@ -1323,7 +1322,7 @@ fn make_exe_name(config: &Config, testfile: &Path) -> PathBuf { let mut f = output_base_name(config, testfile); if !env::consts::EXE_SUFFIX.is_empty() { let mut fname = f.file_name().unwrap().to_os_string(); - fname.push_os_str(OsStr::from_str(env::consts::EXE_SUFFIX)); + fname.push(env::consts::EXE_SUFFIX); f.set_file_name(&fname); } f @@ -1433,7 +1432,7 @@ fn make_out_name(config: &Config, testfile: &Path, extension: &str) -> PathBuf { fn aux_output_dir_name(config: &Config, testfile: &Path) -> PathBuf { let f = output_base_name(config, testfile); let mut fname = f.file_name().unwrap().to_os_string(); - fname.push_os_str(OsStr::from_str("libaux")); + fname.push("libaux"); f.with_file_name(&fname) } @@ -1647,8 +1646,8 @@ fn append_suffix_to_stem(p: &Path, suffix: &str) -> PathBuf { p.to_path_buf() } else { let mut stem = p.file_stem().unwrap().to_os_string(); - stem.push_os_str(OsStr::from_str("-")); - stem.push_os_str(OsStr::from_str(suffix)); + stem.push("-"); + stem.push(suffix); p.with_file_name(&stem) } } |
