Skip to content

Commit 3dc38b0

Browse files
committed
std: Stop reexporting the contents of 'mod consts'
This prevents usage of the win32 utf-16 helper functions from outside of libstd. Closes #9053
1 parent 0dcdefc commit 3dc38b0

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/compiletest/runtest.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,8 @@ fn make_lib_name(config: &config, auxfile: &Path, testfile: &Path) -> Path {
757757

758758
fn make_exe_name(config: &config, testfile: &Path) -> Path {
759759
let mut f = output_base_name(config, testfile);
760-
if !os::EXE_SUFFIX.is_empty() {
761-
match f.filename().map(|s| s + os::EXE_SUFFIX.as_bytes()) {
760+
if !os::consts::EXE_SUFFIX.is_empty() {
761+
match f.filename().map(|s| s + os::consts::EXE_SUFFIX.as_bytes()) {
762762
Some(v) => f.set_filename(v),
763763
None => ()
764764
}

src/librustpkg/path_util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ pub fn mk_output_path(what: OutputType, where: Target,
390390
Bench => "bench",
391391
_ => ""
392392
},
393-
os::EXE_SUFFIX))
393+
os::consts::EXE_SUFFIX))
394394
};
395395
if !output_path.is_absolute() {
396396
output_path = os::getcwd().join(&output_path);

src/libstd/os.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ use to_str;
4343
use unstable::finally::Finally;
4444
use sync::atomics::{AtomicInt, INIT_ATOMIC_INT, SeqCst};
4545

46-
pub use os::consts::*;
47-
4846
/// Delegates to the libc close() function, returning the same return value.
4947
pub fn close(fd: c_int) -> c_int {
5048
unsafe {
@@ -334,7 +332,7 @@ pub fn pipe() -> Pipe {
334332

335333
/// Returns the proper dll filename for the given basename of a file.
336334
pub fn dll_filename(base: &str) -> ~str {
337-
format!("{}{}{}", DLL_PREFIX, base, DLL_SUFFIX)
335+
format!("{}{}{}", consts::DLL_PREFIX, base, consts::DLL_SUFFIX)
338336
}
339337

340338
/// Optionally returns the filesystem path to the current executable which is

0 commit comments

Comments
 (0)