about summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-25 17:06:52 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-26 12:10:22 -0700
commit43bfaa4a336095eb5697fb2df50909fd3c72ed14 (patch)
treee10610e1ce9811c89e1291b786d7a49b63ee02d9 /src/compiletest
parent54f16b818b58f6d6e81891b041fc751986e75155 (diff)
downloadrust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.tar.gz
rust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.zip
Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/compiletest.rs1
-rw-r--r--src/compiletest/errors.rs8
-rw-r--r--src/compiletest/header.rs10
-rw-r--r--src/compiletest/runtest.rs12
4 files changed, 15 insertions, 16 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs
index 1ee5917ac9c..6511bbd8475 100644
--- a/src/compiletest/compiletest.rs
+++ b/src/compiletest/compiletest.rs
@@ -12,7 +12,6 @@
 
 #![feature(box_syntax)]
 #![feature(collections)]
-#![feature(int_uint)]
 #![feature(old_io)]
 #![feature(old_path)]
 #![feature(rustc_private)]
diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs
index 2b0e7985229..4b2a3e0283d 100644
--- a/src/compiletest/errors.rs
+++ b/src/compiletest/errors.rs
@@ -15,13 +15,13 @@ use std::io::prelude::*;
 use std::path::Path;
 
 pub struct ExpectedError {
-    pub line: uint,
+    pub line: usize,
     pub kind: String,
     pub msg: String,
 }
 
 #[derive(PartialEq, Debug)]
-enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
+enum WhichLine { ThisLine, FollowPrevious(usize), AdjustBackward(usize) }
 
 /// Looks for either "//~| KIND MESSAGE" or "//~^^... KIND MESSAGE"
 /// The former is a "follow" that inherits its target from the preceding line;
@@ -58,8 +58,8 @@ pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
     }).collect()
 }
 
-fn parse_expected(last_nonfollow_error: Option<uint>,
-                  line_num: uint,
+fn parse_expected(last_nonfollow_error: Option<usize>,
+                  line_num: usize,
                   line: &str) -> Option<(WhichLine, ExpectedError)> {
     let start = match line.find("//~") { Some(i) => i, None => return None };
     let (follow, adjusts) = if line.char_at(start + 3) == '|' {
diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs
index 461b5af6204..9612c0e06a3 100644
--- a/src/compiletest/header.rs
+++ b/src/compiletest/header.rs
@@ -357,7 +357,7 @@ pub fn parse_name_value_directive(line: &str, directive: &str)
     }
 }
 
-pub fn gdb_version_to_int(version_string: &str) -> int {
+pub fn gdb_version_to_int(version_string: &str) -> isize {
     let error_string = format!(
         "Encountered GDB version string with unexpected format: {}",
         version_string);
@@ -369,17 +369,17 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
         panic!("{}", error_string);
     }
 
-    let major: int = components[0].parse().ok().expect(&error_string);
-    let minor: int = components[1].parse().ok().expect(&error_string);
+    let major: isize = components[0].parse().ok().expect(&error_string);
+    let minor: isize = components[1].parse().ok().expect(&error_string);
 
     return major * 1000 + minor;
 }
 
-pub fn lldb_version_to_int(version_string: &str) -> int {
+pub fn lldb_version_to_int(version_string: &str) -> isize {
     let error_string = format!(
         "Encountered LLDB version string with unexpected format: {}",
         version_string);
     let error_string = error_string;
-    let major: int = version_string.parse().ok().expect(&error_string);
+    let major: isize = version_string.parse().ok().expect(&error_string);
     return major;
 }
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index 1666124b46a..23267c3e934 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -758,7 +758,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
 struct DebuggerCommands {
     commands: Vec<String>,
     check_lines: Vec<String>,
-    breakpoint_lines: Vec<uint>,
+    breakpoint_lines: Vec<usize>,
 }
 
 fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
@@ -1036,7 +1036,7 @@ fn is_compiler_error_or_warning(line: &str) -> bool {
          scan_string(line, "warning", &mut i));
 }
 
-fn scan_until_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
+fn scan_until_char(haystack: &str, needle: char, idx: &mut usize) -> bool {
     if *idx >= haystack.len() {
         return false;
     }
@@ -1048,7 +1048,7 @@ fn scan_until_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
     return true;
 }
 
-fn scan_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
+fn scan_char(haystack: &str, needle: char, idx: &mut usize) -> bool {
     if *idx >= haystack.len() {
         return false;
     }
@@ -1060,7 +1060,7 @@ fn scan_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
     return true;
 }
 
-fn scan_integer(haystack: &str, idx: &mut uint) -> bool {
+fn scan_integer(haystack: &str, idx: &mut usize) -> bool {
     let mut i = *idx;
     while i < haystack.len() {
         let ch = haystack.char_at(i);
@@ -1076,7 +1076,7 @@ fn scan_integer(haystack: &str, idx: &mut uint) -> bool {
     return true;
 }
 
-fn scan_string(haystack: &str, needle: &str, idx: &mut uint) -> bool {
+fn scan_string(haystack: &str, needle: &str, idx: &mut usize) -> bool {
     let mut haystack_i = *idx;
     let mut needle_i = 0;
     while needle_i < needle.len() {
@@ -1725,7 +1725,7 @@ fn disassemble_extract(config: &Config, _props: &TestProps,
 }
 
 
-fn count_extracted_lines(p: &Path) -> uint {
+fn count_extracted_lines(p: &Path) -> usize {
     let mut x = Vec::new();
     File::open(&p.with_extension("ll")).unwrap().read_to_end(&mut x).unwrap();
     let x = str::from_utf8(&x).unwrap();