Skip to content

Commit

Permalink
Remove dead codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ktt3ja committed Dec 8, 2013
1 parent c06dd0e commit 1755408
Show file tree
Hide file tree
Showing 67 changed files with 150 additions and 1,130 deletions.
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
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

0 comments on commit 1755408

Please sign in to comment.