Skip to content

Commit 5520801

Browse files
committed
Auto merge of #23796 - alexcrichton:rollup, r=alexcrichton
2 parents 0c9de81 + d3a4f36 commit 5520801

File tree

1,616 files changed

+7967
-8427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,616 files changed

+7967
-8427
lines changed

src/compiletest/compiletest.rs

-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212

1313
#![feature(box_syntax)]
1414
#![feature(collections)]
15-
#![feature(int_uint)]
1615
#![feature(old_io)]
17-
#![feature(old_path)]
1816
#![feature(rustc_private)]
1917
#![feature(unboxed_closures)]
2018
#![feature(std_misc)]

src/compiletest/errors.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ use std::io::prelude::*;
1515
use std::path::Path;
1616

1717
pub struct ExpectedError {
18-
pub line: uint,
18+
pub line: usize,
1919
pub kind: String,
2020
pub msg: String,
2121
}
2222

2323
#[derive(PartialEq, Debug)]
24-
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
24+
enum WhichLine { ThisLine, FollowPrevious(usize), AdjustBackward(usize) }
2525

2626
/// Looks for either "//~| KIND MESSAGE" or "//~^^... KIND MESSAGE"
2727
/// 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> {
5858
}).collect()
5959
}
6060

61-
fn parse_expected(last_nonfollow_error: Option<uint>,
62-
line_num: uint,
61+
fn parse_expected(last_nonfollow_error: Option<usize>,
62+
line_num: usize,
6363
line: &str) -> Option<(WhichLine, ExpectedError)> {
6464
let start = match line.find("//~") { Some(i) => i, None => return None };
6565
let (follow, adjusts) = if line.char_at(start + 3) == '|' {

src/compiletest/header.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ pub fn parse_name_value_directive(line: &str, directive: &str)
357357
}
358358
}
359359

360-
pub fn gdb_version_to_int(version_string: &str) -> int {
360+
pub fn gdb_version_to_int(version_string: &str) -> isize {
361361
let error_string = format!(
362362
"Encountered GDB version string with unexpected format: {}",
363363
version_string);
@@ -369,17 +369,17 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
369369
panic!("{}", error_string);
370370
}
371371

372-
let major: int = components[0].parse().ok().expect(&error_string);
373-
let minor: int = components[1].parse().ok().expect(&error_string);
372+
let major: isize = components[0].parse().ok().expect(&error_string);
373+
let minor: isize = components[1].parse().ok().expect(&error_string);
374374

375375
return major * 1000 + minor;
376376
}
377377

378-
pub fn lldb_version_to_int(version_string: &str) -> int {
378+
pub fn lldb_version_to_int(version_string: &str) -> isize {
379379
let error_string = format!(
380380
"Encountered LLDB version string with unexpected format: {}",
381381
version_string);
382382
let error_string = error_string;
383-
let major: int = version_string.parse().ok().expect(&error_string);
383+
let major: isize = version_string.parse().ok().expect(&error_string);
384384
return major;
385385
}

src/compiletest/procsrv.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,25 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(deprecated)] // for old path, for dynamic_lib
12-
1311
use std::dynamic_lib::DynamicLibrary;
1412
use std::io::prelude::*;
15-
use std::old_path::Path;
13+
use std::path::PathBuf;
1614
use std::process::{ExitStatus, Command, Child, Output, Stdio};
1715

1816
fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
1917
// Need to be sure to put both the lib_path and the aux path in the dylib
2018
// search path for the child.
2119
let mut path = DynamicLibrary::search_path();
2220
match aux_path {
23-
Some(p) => path.insert(0, Path::new(p)),
21+
Some(p) => path.insert(0, PathBuf::from(p)),
2422
None => {}
2523
}
26-
path.insert(0, Path::new(lib_path));
24+
path.insert(0, PathBuf::from(lib_path));
2725

2826
// Add the new dylib search path var
2927
let var = DynamicLibrary::envvar();
3028
let newpath = DynamicLibrary::create_path(&path);
31-
let newpath = String::from_utf8(newpath).unwrap();
29+
let newpath = newpath.to_str().unwrap().to_string();
3230
cmd.env(var, &newpath);
3331
}
3432

src/compiletest/runtest.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
758758
struct DebuggerCommands {
759759
commands: Vec<String>,
760760
check_lines: Vec<String>,
761-
breakpoint_lines: Vec<uint>,
761+
breakpoint_lines: Vec<usize>,
762762
}
763763

764764
fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
@@ -1036,7 +1036,7 @@ fn is_compiler_error_or_warning(line: &str) -> bool {
10361036
scan_string(line, "warning", &mut i));
10371037
}
10381038

1039-
fn scan_until_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
1039+
fn scan_until_char(haystack: &str, needle: char, idx: &mut usize) -> bool {
10401040
if *idx >= haystack.len() {
10411041
return false;
10421042
}
@@ -1048,7 +1048,7 @@ fn scan_until_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
10481048
return true;
10491049
}
10501050

1051-
fn scan_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
1051+
fn scan_char(haystack: &str, needle: char, idx: &mut usize) -> bool {
10521052
if *idx >= haystack.len() {
10531053
return false;
10541054
}
@@ -1060,7 +1060,7 @@ fn scan_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
10601060
return true;
10611061
}
10621062

1063-
fn scan_integer(haystack: &str, idx: &mut uint) -> bool {
1063+
fn scan_integer(haystack: &str, idx: &mut usize) -> bool {
10641064
let mut i = *idx;
10651065
while i < haystack.len() {
10661066
let ch = haystack.char_at(i);
@@ -1076,7 +1076,7 @@ fn scan_integer(haystack: &str, idx: &mut uint) -> bool {
10761076
return true;
10771077
}
10781078

1079-
fn scan_string(haystack: &str, needle: &str, idx: &mut uint) -> bool {
1079+
fn scan_string(haystack: &str, needle: &str, idx: &mut usize) -> bool {
10801080
let mut haystack_i = *idx;
10811081
let mut needle_i = 0;
10821082
while needle_i < needle.len() {
@@ -1725,7 +1725,7 @@ fn disassemble_extract(config: &Config, _props: &TestProps,
17251725
}
17261726

17271727

1728-
fn count_extracted_lines(p: &Path) -> uint {
1728+
fn count_extracted_lines(p: &Path) -> usize {
17291729
let mut x = Vec::new();
17301730
File::open(&p.with_extension("ll")).unwrap().read_to_end(&mut x).unwrap();
17311731
let x = str::from_utf8(&x).unwrap();

src/compiletest/util.rs

+17-16
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,34 @@ use common::Config;
1313

1414
/// Conversion table from triple OS name to Rust SYSNAME
1515
const OS_TABLE: &'static [(&'static str, &'static str)] = &[
16-
("mingw32", "windows"),
17-
("win32", "windows"),
18-
("windows", "windows"),
19-
("darwin", "macos"),
2016
("android", "android"),
21-
("linux", "linux"),
22-
("freebsd", "freebsd"),
23-
("dragonfly", "dragonfly"),
2417
("bitrig", "bitrig"),
18+
("darwin", "macos"),
19+
("dragonfly", "dragonfly"),
20+
("freebsd", "freebsd"),
21+
("ios", "ios"),
22+
("linux", "linux"),
23+
("mingw32", "windows"),
2524
("openbsd", "openbsd"),
25+
("win32", "windows"),
26+
("windows", "windows"),
2627
];
2728

2829
const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[
29-
("i386", "x86"),
30-
("i686", "x86"),
30+
("aarch64", "aarch64"),
3131
("amd64", "x86_64"),
32-
("x86_64", "x86_64"),
33-
("sparc", "sparc"),
34-
("powerpc", "powerpc"),
35-
("arm64", "aarch64"),
3632
("arm", "arm"),
37-
("aarch64", "aarch64"),
33+
("arm64", "aarch64"),
34+
("hexagon", "hexagon"),
35+
("i386", "x86"),
36+
("i686", "x86"),
3837
("mips", "mips"),
39-
("xcore", "xcore"),
4038
("msp430", "msp430"),
41-
("hexagon", "hexagon"),
39+
("powerpc", "powerpc"),
4240
("s390x", "systemz"),
41+
("sparc", "sparc"),
42+
("x86_64", "x86_64"),
43+
("xcore", "xcore"),
4344
];
4445

4546
pub fn get_os(triple: &str) -> &'static str {

0 commit comments

Comments
 (0)