Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,6 @@ pub fn opt_str2(maybestr: Option<~str>) -> ~str {
match maybestr { None => ~"(none)", Some(s) => { s } }
}

pub fn str_opt(maybestr: ~str) -> Option<~str> {
if maybestr != ~"(none)" { Some(maybestr) } else { None }
}

pub fn str_mode(s: ~str) -> mode {
match s {
~"compile-fail" => mode_compile_fail,
Expand Down
3 changes: 3 additions & 0 deletions src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use header::TestProps;
use header::load_props;
use procsrv;
use util::logv;
#[cfg(target_os = "win32")]
use util;

use std::io::File;
Expand Down Expand Up @@ -482,6 +483,7 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
format!("{}:{}:", testfile.display(), ee.line)
}).collect::<~[~str]>();

#[cfg(target_os = "win32")]
fn to_lower( s : &str ) -> ~str {
let i = s.chars();
let c : ~[char] = i.map( |c| {
Expand Down Expand Up @@ -822,6 +824,7 @@ fn make_cmdline(libpath: &str, prog: &str, args: &[~str]) -> ~str {

// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
// for diagnostic purposes
#[cfg(target_os = "win32")]
fn lib_path_cmd_prefix(path: &str) -> ~str {
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
}
Expand Down
14 changes: 2 additions & 12 deletions src/compiletest/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use common::config;

#[cfg(target_os = "win32")]
use std::os::getenv;

/// Conversion table from triple OS name to Rust SYSNAME
Expand All @@ -31,6 +32,7 @@ pub fn get_os(triple: &str) -> &'static str {
fail!("Cannot determine OS from triple");
}

#[cfg(target_os = "win32")]
pub fn make_new_path(path: &str) -> ~str {

// Windows just uses PATH as the library search path, so we have to
Expand All @@ -43,21 +45,9 @@ pub fn make_new_path(path: &str) -> ~str {
}
}

#[cfg(target_os = "linux")]
#[cfg(target_os = "freebsd")]
pub fn lib_path_env_var() -> ~str { ~"LD_LIBRARY_PATH" }

#[cfg(target_os = "macos")]
pub fn lib_path_env_var() -> ~str { ~"DYLD_LIBRARY_PATH" }

#[cfg(target_os = "win32")]
pub fn lib_path_env_var() -> ~str { ~"PATH" }

#[cfg(target_os = "linux")]
#[cfg(target_os = "macos")]
#[cfg(target_os = "freebsd")]
pub fn path_div() -> ~str { ~":" }

#[cfg(target_os = "win32")]
pub fn path_div() -> ~str { ~";" }

Expand Down
1 change: 1 addition & 0 deletions src/etc/extract-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#[ allow(dead_assignment) ];\n
#[ allow(unused_mut) ];\n
#[ allow(attribute_usage) ];\n
#[ allow(dead_code) ];\n
#[ feature(macro_rules, globs, struct_variant, managed_boxes) ];\n
""" + block
if xfail:
Expand Down
8 changes: 3 additions & 5 deletions src/libextra/bitv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,9 @@ impl Bitv {
#[inline]
pub fn negate(&mut self) {
match self.rep {
Small(ref mut b) => b.negate(),
Big(ref mut s) => {
s.each_storage(|w| { *w = !*w; true });
}
}
Small(ref mut s) => s.negate(),
Big(ref mut b) => b.negate(),
}
}

/**
Expand Down
Loading