about summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-11-23 20:26:58 +0000
committerbors <bors@rust-lang.org>2014-11-23 20:26:58 +0000
commit4e5259503cd8aac9905c7ac6d68d0c4caab1d28c (patch)
tree9d93d055fa5aa82480c4b5771aba4cca5efdfc9b /src/compiletest
parent220b99b148559e8996a1dbd279e8ca190bf94b2e (diff)
parentd6b023a46750d6c2df919908bd0f1460d3d9c8a6 (diff)
downloadrust-4e5259503cd8aac9905c7ac6d68d0c4caab1d28c.tar.gz
rust-4e5259503cd8aac9905c7ac6d68d0c4caab1d28c.zip
auto merge of #19242 : jakub-/rust/roll-up, r=jakub-
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/errors.rs3
-rw-r--r--src/compiletest/runtest.rs15
2 files changed, 10 insertions, 8 deletions
diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs
index 3751f8f4dc0..c795e69a44d 100644
--- a/src/compiletest/errors.rs
+++ b/src/compiletest/errors.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::ascii::AsciiExt;
 use std::io::{BufferedReader, File};
 use regex::Regex;
 
@@ -31,7 +32,7 @@ pub fn load_errors(re: &Regex, testfile: &Path) -> Vec<ExpectedError> {
 fn parse_expected(line_num: uint, line: &str, re: &Regex) -> Option<ExpectedError> {
     re.captures(line).and_then(|caps| {
         let adjusts = caps.name("adjusts").len();
-        let kind = caps.name("kind").to_ascii().to_lowercase().into_string();
+        let kind = caps.name("kind").to_ascii_lower();
         let msg = caps.name("msg").trim().to_string();
 
         debug!("line={} kind={} msg={}", line_num, kind, msg);
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index 9bf45de0a17..5c3e5e12adb 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -7,7 +7,7 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#[cfg(not(stage0))]
+
 use self::TargetLocation::*;
 
 use common::Config;
@@ -990,7 +990,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
         let i = s.chars();
         let c : Vec<char> = i.map( |c| {
             if c.is_ascii() {
-                c.to_ascii().to_lowercase().to_char()
+                c.to_ascii().to_lowercase().as_char()
             } else {
                 c
             }
@@ -1161,7 +1161,7 @@ fn compile_test_(config: &Config, props: &TestProps,
     let args = make_compile_args(config,
                                  props,
                                  link_args,
-                                 |a, b| ThisFile(make_exe_name(a, b)), testfile);
+                                 |a, b| TargetLocation::ThisFile(make_exe_name(a, b)), testfile);
     compose_and_run_compiler(config, props, testfile, args, None)
 }
 
@@ -1219,7 +1219,7 @@ fn compose_and_run_compiler(
                               crate_type,
                               |a,b| {
                                   let f = make_lib_name(a, b, testfile);
-                                  ThisDirectory(f.dir_path())
+                                  TargetLocation::ThisDirectory(f.dir_path())
                               },
                               &abs_ab);
         let auxres = compose_and_run(config,
@@ -1296,11 +1296,11 @@ fn make_compile_args(config: &Config,
         args.push("prefer-dynamic".to_string());
     }
     let path = match xform_file {
-        ThisFile(path) => {
+        TargetLocation::ThisFile(path) => {
             args.push("-o".to_string());
             path
         }
-        ThisDirectory(path) => {
+        TargetLocation::ThisDirectory(path) => {
             args.push("--out-dir".to_string());
             path
         }
@@ -1672,7 +1672,8 @@ fn compile_test_and_save_bitcode(config: &Config, props: &TestProps,
     let args = make_compile_args(config,
                                  props,
                                  link_args,
-                                 |a, b| ThisDirectory(output_base_name(a, b).dir_path()),
+                                 |a, b| TargetLocation::ThisDirectory(
+                                     output_base_name(a, b).dir_path()),
                                  testfile);
     compose_and_run_compiler(config, props, testfile, args, None)
 }