Skip to content

Commit ca8d6ac

Browse files
committed
---
yaml --- r: 178719 b: refs/heads/master c: a3d2d35 h: refs/heads/master i: 178717: 0da01e1 178715: a9b8a04 178711: 7ade4ff 178703: 10ddefc 178687: 17ab0db v: v3
1 parent 4f2490b commit ca8d6ac

File tree

467 files changed

+3365
-6087
lines changed

Some content is hidden

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

467 files changed

+3365
-6087
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 3d072a193bfcb76206aab576049e696d6d8db25d
2+
refs/heads/master: a3d2d35fcbdc4ef5afc1fff2cc6d5ba34004cef4
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3b2ed14906fd9f9daa27cc7d1dad263d2f5ff450
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77

trunk/COPYRIGHT

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ The following third party packages are included, and carry
2323
their own copyright notices and license terms:
2424

2525
* Two header files that are part of the Valgrind
26-
package. These files are found at src/rt/valgrind/valgrind.h and
27-
src/rt/valgrind/memcheck.h, within this distribution. These files
26+
package. These files are found at src/rt/vg/valgrind.h and
27+
src/rt/vg/memcheck.h, within this distribution. These files
2828
are redistributed under the following terms, as noted in
2929
them:
3030

31-
for src/rt/valgrind/valgrind.h:
31+
for src/rt/vg/valgrind.h:
3232

3333
This file is part of Valgrind, a dynamic binary
3434
instrumentation framework.
@@ -74,7 +74,7 @@ their own copyright notices and license terms:
7474
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
7575
OF SUCH DAMAGE.
7676

77-
for src/rt/valgrind/memcheck.h:
77+
for src/rt/vg/memcheck.h:
7878

7979
This file is part of MemCheck, a heavyweight Valgrind
8080
tool for detecting memory errors.
@@ -120,6 +120,18 @@ their own copyright notices and license terms:
120120
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
121121
OF SUCH DAMAGE.
122122

123+
* The auxiliary file src/etc/pkg/modpath.iss contains a
124+
library routine compiled, by Inno Setup, into the Windows
125+
installer binary. This file is licensed under the LGPL,
126+
version 3, but, in our legal interpretation, this does not
127+
affect the aggregate "collected work" license of the Rust
128+
distribution (MIT/ASL2) nor any other components of it. We
129+
believe that the terms governing distribution of the
130+
binary Windows installer built from modpath.iss are
131+
therefore LGPL, but not the terms governing distribution
132+
of any of the files installed by such an installer (such
133+
as the Rust compiler or runtime libraries themselves).
134+
123135
* The src/rt/miniz.c file, carrying an implementation of
124136
RFC1950/RFC1951 DEFLATE, by Rich Geldreich
125137
<[email protected]>. All uses of this file are

trunk/configure

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,6 @@ case $CFG_OSTYPE in
374374
CFG_OSTYPE=unknown-dragonfly
375375
;;
376376

377-
OpenBSD)
378-
CFG_OSTYPE=unknown-openbsd
379-
;;
380-
381377
Darwin)
382378
CFG_OSTYPE=apple-darwin
383379
;;

trunk/mk/cfg/x86_64-unknown-openbsd.mk

Lines changed: 0 additions & 26 deletions
This file was deleted.

trunk/src/compiletest/compiletest.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#![feature(std_misc)]
2323
#![feature(test)]
2424
#![feature(unicode)]
25-
#![feature(env)]
2625

2726
#![deny(warnings)]
2827

@@ -32,7 +31,7 @@ extern crate getopts;
3231
#[macro_use]
3332
extern crate log;
3433

35-
use std::env;
34+
use std::os;
3635
use std::old_io;
3736
use std::old_io::fs;
3837
use std::thunk::Thunk;
@@ -49,7 +48,7 @@ pub mod common;
4948
pub mod errors;
5049

5150
pub fn main() {
52-
let args = env::args().map(|s| s.into_string().unwrap()).collect();;
51+
let args = os::args();
5352
let config = parse_config(args);
5453

5554
if config.valgrind_path.is_none() && config.force_valgrind {
@@ -225,15 +224,15 @@ pub fn run_tests(config: &Config) {
225224
//arm-linux-androideabi debug-info test uses remote debugger
226225
//so, we test 1 task at once.
227226
// also trying to isolate problems with adb_run_wrapper.sh ilooping
228-
env::set_var("RUST_TEST_TASKS","1");
227+
os::setenv("RUST_TEST_TASKS","1");
229228
}
230229

231230
match config.mode {
232231
DebugInfoLldb => {
233232
// Some older versions of LLDB seem to have problems with multiple
234233
// instances running in parallel, so only run one test task at a
235234
// time.
236-
env::set_var("RUST_TEST_TASKS", "1");
235+
os::setenv("RUST_TEST_TASKS", "1");
237236
}
238237
_ => { /* proceed */ }
239238
}
@@ -246,7 +245,7 @@ pub fn run_tests(config: &Config) {
246245
old_io::test::raise_fd_limit();
247246
// Prevent issue #21352 UAC blocking .exe containing 'patch' etc. on Windows
248247
// If #11207 is resolved (adding manifest to .exe) this becomes unnecessary
249-
env::set_var("__COMPAT_LAYER", "RunAsInvoker");
248+
os::setenv("__COMPAT_LAYER", "RunAsInvoker");
250249
let res = test::run_tests_console(&opts, tests.into_iter().collect());
251250
match res {
252251
Ok(true) => {}
@@ -277,7 +276,7 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
277276
config.src_base.display());
278277
let mut tests = Vec::new();
279278
let dirs = fs::readdir(&config.src_base).unwrap();
280-
for file in &dirs {
279+
for file in dirs.iter() {
281280
let file = file.clone();
282281
debug!("inspecting file {:?}", file.display());
283282
if is_test(config, &file) {
@@ -305,13 +304,13 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
305304

306305
let mut valid = false;
307306

308-
for ext in &valid_extensions {
307+
for ext in valid_extensions.iter() {
309308
if name.ends_with(ext.as_slice()) {
310309
valid = true;
311310
}
312311
}
313312

314-
for pre in &invalid_prefixes {
313+
for pre in invalid_prefixes.iter() {
315314
if name.starts_with(pre.as_slice()) {
316315
valid = false;
317316
}

trunk/src/compiletest/header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> {
300300
.collect();
301301

302302
match strs.len() {
303-
1 => (strs.pop().unwrap(), "".to_string()),
304-
2 => {
303+
1u => (strs.pop().unwrap(), "".to_string()),
304+
2u => {
305305
let end = strs.pop().unwrap();
306306
(strs.pop().unwrap(), end)
307307
}

trunk/src/compiletest/procsrv.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ pub fn run(lib_path: &str,
4040
let mut cmd = Command::new(prog);
4141
cmd.args(args);
4242
add_target_env(&mut cmd, lib_path, aux_path);
43-
for (key, val) in env {
43+
for (key, val) in env.into_iter() {
4444
cmd.env(key, val);
4545
}
4646

4747
match cmd.spawn() {
4848
Ok(mut process) => {
49-
if let Some(input) = input {
49+
for input in input.iter() {
5050
process.stdin.as_mut().unwrap().write_all(input.as_bytes()).unwrap();
5151
}
5252
let ProcessOutput { status, output, error } =
@@ -72,13 +72,13 @@ pub fn run_background(lib_path: &str,
7272
let mut cmd = Command::new(prog);
7373
cmd.args(args);
7474
add_target_env(&mut cmd, lib_path, aux_path);
75-
for (key, val) in env {
75+
for (key, val) in env.into_iter() {
7676
cmd.env(key, val);
7777
}
7878

7979
match cmd.spawn() {
8080
Ok(mut process) => {
81-
if let Some(input) = input {
81+
for input in input.iter() {
8282
process.stdin.as_mut().unwrap().write_all(input.as_bytes()).unwrap();
8383
}
8484

trunk/src/compiletest/runtest.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use std::old_io::process::ProcessExit;
3131
use std::old_io::process;
3232
use std::old_io::timer;
3333
use std::old_io;
34-
use std::env;
34+
use std::os;
3535
use std::iter::repeat;
3636
use std::str;
3737
use std::string::String;
@@ -230,9 +230,9 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
230230
let s = File::open(&filepath).read_to_end().unwrap();
231231
String::from_utf8(s).unwrap()
232232
}
233-
None => { srcs[srcs.len() - 2].clone() }
233+
None => { srcs[srcs.len() - 2u].clone() }
234234
};
235-
let mut actual = srcs[srcs.len() - 1].clone();
235+
let mut actual = srcs[srcs.len() - 1u].clone();
236236

237237
if props.pp_exact.is_some() {
238238
// Now we have to care about line endings
@@ -547,7 +547,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
547547
exe_file.as_str().unwrap().replace("\\", "\\\\"))[]);
548548

549549
// Add line breakpoints
550-
for line in &breakpoint_lines {
550+
for line in breakpoint_lines.iter() {
551551
script_str.push_str(&format!("break '{}':{}\n",
552552
testfile.filename_display(),
553553
*line)[]);
@@ -683,13 +683,13 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
683683
script_str.push_str("type category enable Rust\n");
684684

685685
// Set breakpoints on every line that contains the string "#break"
686-
for line in &breakpoint_lines {
686+
for line in breakpoint_lines.iter() {
687687
script_str.push_str(format!("breakpoint set --line {}\n",
688688
line).as_slice());
689689
}
690690

691691
// Append the other commands
692-
for line in &commands {
692+
for line in commands.iter() {
693693
script_str.push_str(line.as_slice());
694694
script_str.push_str("\n");
695695
}
@@ -842,12 +842,12 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
842842
}).collect();
843843
// check if each line in props.check_lines appears in the
844844
// output (in order)
845-
let mut i = 0;
845+
let mut i = 0u;
846846
for line in debugger_run_result.stdout.lines() {
847847
let mut rest = line.trim();
848848
let mut first = true;
849849
let mut failed = false;
850-
for frag in &check_fragments[i] {
850+
for frag in check_fragments[i].iter() {
851851
let found = if first {
852852
if rest.starts_with(frag.as_slice()) {
853853
Some(0)
@@ -869,7 +869,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
869869
first = false;
870870
}
871871
if !failed && rest.len() == 0 {
872-
i += 1;
872+
i += 1u;
873873
}
874874
if i == num_check_lines {
875875
// all lines checked
@@ -892,13 +892,13 @@ fn check_error_patterns(props: &TestProps,
892892
fatal(format!("no error pattern specified in {:?}",
893893
testfile.display()).as_slice());
894894
}
895-
let mut next_err_idx = 0;
895+
let mut next_err_idx = 0u;
896896
let mut next_err_pat = &props.error_patterns[next_err_idx];
897897
let mut done = false;
898898
for line in output_to_check.lines() {
899899
if line.contains(next_err_pat.as_slice()) {
900900
debug!("found error pattern {}", next_err_pat);
901-
next_err_idx += 1;
901+
next_err_idx += 1u;
902902
if next_err_idx == props.error_patterns.len() {
903903
debug!("found all error patterns");
904904
done = true;
@@ -910,12 +910,12 @@ fn check_error_patterns(props: &TestProps,
910910
if done { return; }
911911

912912
let missing_patterns = &props.error_patterns[next_err_idx..];
913-
if missing_patterns.len() == 1 {
913+
if missing_patterns.len() == 1u {
914914
fatal_proc_rec(format!("error pattern '{}' not found!",
915915
missing_patterns[0]).as_slice(),
916916
proc_res);
917917
} else {
918-
for pattern in missing_patterns {
918+
for pattern in missing_patterns.iter() {
919919
error(format!("error pattern '{}' not found!",
920920
*pattern).as_slice());
921921
}
@@ -935,7 +935,7 @@ fn check_no_compiler_crash(proc_res: &ProcRes) {
935935
fn check_forbid_output(props: &TestProps,
936936
output_to_check: &str,
937937
proc_res: &ProcRes) {
938-
for pat in &props.forbid_output {
938+
for pat in props.forbid_output.iter() {
939939
if output_to_check.contains(pat.as_slice()) {
940940
fatal_proc_rec("forbidden pattern found in compiler output", proc_res);
941941
}
@@ -1025,7 +1025,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
10251025
}
10261026

10271027
fn is_compiler_error_or_warning(line: &str) -> bool {
1028-
let mut i = 0;
1028+
let mut i = 0u;
10291029
return
10301030
scan_until_char(line, ':', &mut i) &&
10311031
scan_char(line, ':', &mut i) &&
@@ -1084,7 +1084,7 @@ fn scan_integer(haystack: &str, idx: &mut uint) -> bool {
10841084

10851085
fn scan_string(haystack: &str, needle: &str, idx: &mut uint) -> bool {
10861086
let mut haystack_i = *idx;
1087-
let mut needle_i = 0;
1087+
let mut needle_i = 0u;
10881088
while needle_i < needle.len() {
10891089
if haystack_i >= haystack.len() {
10901090
return false;
@@ -1173,7 +1173,7 @@ fn compose_and_run_compiler(
11731173
// FIXME (#9639): This needs to handle non-utf8 paths
11741174
let extra_link_args = vec!("-L".to_string(), aux_dir.as_str().unwrap().to_string());
11751175

1176-
for rel_ab in &props.aux_builds {
1176+
for rel_ab in props.aux_builds.iter() {
11771177
let abs_ab = config.aux_base.join(rel_ab.as_slice());
11781178
let aux_props = header::load_props(&abs_ab);
11791179
let mut crate_type = if aux_props.no_prefer_dynamic {
@@ -1298,9 +1298,9 @@ fn make_lib_name(config: &Config, auxfile: &Path, testfile: &Path) -> Path {
12981298

12991299
fn make_exe_name(config: &Config, testfile: &Path) -> Path {
13001300
let mut f = output_base_name(config, testfile);
1301-
if !env::consts::EXE_SUFFIX.is_empty() {
1301+
if !os::consts::EXE_SUFFIX.is_empty() {
13021302
let mut fname = f.filename().unwrap().to_vec();
1303-
fname.extend(env::consts::EXE_SUFFIX.bytes());
1303+
fname.extend(os::consts::EXE_SUFFIX.bytes());
13041304
f.set_filename(fname);
13051305
}
13061306
f
@@ -1503,14 +1503,14 @@ fn _arm_exec_compiled_test(config: &Config,
15031503

15041504
// run test via adb_run_wrapper
15051505
runargs.push("shell".to_string());
1506-
for (key, val) in env {
1506+
for (key, val) in env.into_iter() {
15071507
runargs.push(format!("{}={}", key, val));
15081508
}
15091509
runargs.push(format!("{}/adb_run_wrapper.sh", config.adb_test_dir));
15101510
runargs.push(format!("{}", config.adb_test_dir));
15111511
runargs.push(format!("{}", prog_short));
15121512

1513-
for tv in &args.args {
1513+
for tv in args.args.iter() {
15141514
runargs.push(tv.to_string());
15151515
}
15161516
procsrv::run("",
@@ -1591,7 +1591,7 @@ fn _arm_push_aux_shared_library(config: &Config, testfile: &Path) {
15911591
let tdir = aux_output_dir_name(config, testfile);
15921592

15931593
let dirs = fs::readdir(&tdir).unwrap();
1594-
for file in &dirs {
1594+
for file in dirs.iter() {
15951595
if file.extension_str() == Some("so") {
15961596
// FIXME (#9639): This needs to handle non-utf8 paths
15971597
let copy_result = procsrv::run("",

0 commit comments

Comments
 (0)