about summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-05-16 10:45:16 -0700
committerPatrick Walton <pcwalton@mimiga.net>2014-05-22 14:42:01 -0700
commit36195eb91f15975fed7555a3aa52807ecd5698a1 (patch)
treed0e99310be4a24e76b8d6b13f05ec79c1f89b6ba /src/compiletest
parente402e75f4eb79af09b9451f0f232f994b3e2c998 (diff)
downloadrust-36195eb91f15975fed7555a3aa52807ecd5698a1.tar.gz
rust-36195eb91f15975fed7555a3aa52807ecd5698a1.zip
libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/compiletest.rs4
-rw-r--r--src/compiletest/header.rs9
-rw-r--r--src/compiletest/runtest.rs9
3 files changed, 14 insertions, 8 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs
index db9cf358a9b..de764d02064 100644
--- a/src/compiletest/compiletest.rs
+++ b/src/compiletest/compiletest.rs
@@ -96,7 +96,7 @@ pub fn parse_config(args: Vec<StrBuf> ) -> Config {
     let args_ = args.tail();
     if args.get(1).as_slice() == "-h" || args.get(1).as_slice() == "--help" {
         let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
-        println!("{}", getopts::usage(message, groups.as_slice()));
+        println!("{}", getopts::usage(message.as_slice(), groups.as_slice()));
         println!("");
         fail!()
     }
@@ -109,7 +109,7 @@ pub fn parse_config(args: Vec<StrBuf> ) -> Config {
 
     if matches.opt_present("h") || matches.opt_present("help") {
         let message = format!("Usage: {} [OPTIONS]  [TESTNAME...]", argv0);
-        println!("{}", getopts::usage(message, groups.as_slice()));
+        println!("{}", getopts::usage(message.as_slice(), groups.as_slice()));
         println!("");
         fail!()
     }
diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs
index 5729a11d7ad..55fca1784de 100644
--- a/src/compiletest/header.rs
+++ b/src/compiletest/header.rs
@@ -157,9 +157,14 @@ fn iter_header(testfile: &Path, it: |&str| -> bool) -> bool {
         // module or function. This doesn't seem to be an optimization
         // with a warm page cache. Maybe with a cold one.
         let ln = ln.unwrap();
-        if ln.starts_with("fn") || ln.starts_with("mod") {
+        if ln.as_slice().starts_with("fn") ||
+                ln.as_slice().starts_with("mod") {
             return true;
-        } else { if !(it(ln.trim())) { return false; } }
+        } else {
+            if !(it(ln.as_slice().trim())) {
+                return false;
+            }
+        }
     }
     return true;
 }
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index 8c2b34ff35d..d8ca94ab464 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -538,7 +538,8 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
 
     // Set breakpoints on every line that contains the string "#break"
     for line in breakpoint_lines.iter() {
-        script_str.push_str(format!("breakpoint set --line {}\n", line));
+        script_str.push_str(format!("breakpoint set --line {}\n",
+                                    line).as_slice());
     }
 
     // Append the other commands
@@ -620,18 +621,18 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
     for line in reader.lines() {
         match line {
             Ok(line) => {
-                if line.contains("#break") {
+                if line.as_slice().contains("#break") {
                     breakpoint_lines.push(counter);
                 }
 
                 header::parse_name_value_directive(
-                        line,
+                        line.as_slice(),
                         command_directive.to_strbuf()).map(|cmd| {
                     commands.push(cmd)
                 });
 
                 header::parse_name_value_directive(
-                        line,
+                        line.as_slice(),
                         check_directive.to_strbuf()).map(|cmd| {
                     check_lines.push(cmd)
                 });