Skip to content

Commit 4a2cc43

Browse files
committed
---
yaml --- r: 178605 b: refs/heads/tmp c: 3b2ed14 h: refs/heads/master i: 178603: c36cb5f v: v3
1 parent fdeef71 commit 4a2cc43

File tree

467 files changed

+6107
-3384
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

+6107
-3384
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: a3d2d35fcbdc4ef5afc1fff2cc6d5ba34004cef4
37+
refs/heads/tmp: 3b2ed14906fd9f9daa27cc7d1dad263d2f5ff450

branches/tmp/COPYRIGHT

Lines changed: 4 additions & 16 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/vg/valgrind.h and
27-
src/rt/vg/memcheck.h, within this distribution. These files
26+
package. These files are found at src/rt/valgrind/valgrind.h and
27+
src/rt/valgrind/memcheck.h, within this distribution. These files
2828
are redistributed under the following terms, as noted in
2929
them:
3030

31-
for src/rt/vg/valgrind.h:
31+
for src/rt/valgrind/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/vg/memcheck.h:
77+
for src/rt/valgrind/memcheck.h:
7878

7979
This file is part of MemCheck, a heavyweight Valgrind
8080
tool for detecting memory errors.
@@ -120,18 +120,6 @@ 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-
135123
* The src/rt/miniz.c file, carrying an implementation of
136124
RFC1950/RFC1951 DEFLATE, by Rich Geldreich
137125
<[email protected]>. All uses of this file are

branches/tmp/configure

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

377+
OpenBSD)
378+
CFG_OSTYPE=unknown-openbsd
379+
;;
380+
377381
Darwin)
378382
CFG_OSTYPE=apple-darwin
379383
;;
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# x86_64-pc-openbsd-elf configuration
2+
CC_x86_64-unknown-openbsd=$(CC)
3+
CXX_x86_64-unknown-openbsd=$(CXX)
4+
CPP_x86_64-unknown-openbsd=$(CPP)
5+
AR_x86_64-unknown-openbsd=$(AR)
6+
CFG_LIB_NAME_x86_64-unknown-openbsd=lib$(1).so
7+
CFG_STATIC_LIB_NAME_x86_64-unknown-openbsd=lib$(1).a
8+
CFG_LIB_GLOB_x86_64-unknown-openbsd=lib$(1)-*.so
9+
CFG_LIB_DSYM_GLOB_x86_64-unknown-openbsd=$(1)-*.dylib.dSYM
10+
CFG_JEMALLOC_CFLAGS_x86_64-unknown-openbsd := -m64 -I/usr/include $(CFLAGS)
11+
CFG_GCCISH_CFLAGS_x86_64-unknown-openbsd := -Wall -Werror -g -fPIC -m64 -I/usr/include $(CFLAGS)
12+
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-openbsd := -shared -fPIC -g -pthread -m64
13+
CFG_GCCISH_DEF_FLAG_x86_64-unknown-openbsd := -Wl,--export-dynamic,--dynamic-list=
14+
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-openbsd := -Wl,-whole-archive
15+
CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-openbsd := -Wl,-no-whole-archive
16+
CFG_DEF_SUFFIX_x86_64-unknown-openbsd := .bsd.def
17+
CFG_LLC_FLAGS_x86_64-unknown-openbsd :=
18+
CFG_INSTALL_NAME_x86_64-unknown-openbsd =
19+
CFG_EXE_SUFFIX_x86_64-unknown-openbsd :=
20+
CFG_WINDOWSY_x86_64-unknown-openbsd :=
21+
CFG_UNIXY_x86_64-unknown-openbsd := 1
22+
CFG_PATH_MUNGE_x86_64-unknown-openbsd :=
23+
CFG_LDPATH_x86_64-unknown-openbsd :=
24+
CFG_RUN_x86_64-unknown-openbsd=$(2)
25+
CFG_RUN_TARG_x86_64-unknown-openbsd=$(call CFG_RUN_x86_64-unknown-openbsd,,$(2))
26+
CFG_GNU_TRIPLE_x86_64-unknown-openbsd := x86_64-unknown-openbsd

branches/tmp/src/compiletest/compiletest.rs

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

2627
#![deny(warnings)]
2728

@@ -31,7 +32,7 @@ extern crate getopts;
3132
#[macro_use]
3233
extern crate log;
3334

34-
use std::os;
35+
use std::env;
3536
use std::old_io;
3637
use std::old_io::fs;
3738
use std::thunk::Thunk;
@@ -48,7 +49,7 @@ pub mod common;
4849
pub mod errors;
4950

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

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

230231
match config.mode {
231232
DebugInfoLldb => {
232233
// Some older versions of LLDB seem to have problems with multiple
233234
// instances running in parallel, so only run one test task at a
234235
// time.
235-
os::setenv("RUST_TEST_TASKS", "1");
236+
env::set_var("RUST_TEST_TASKS", "1");
236237
}
237238
_ => { /* proceed */ }
238239
}
@@ -245,7 +246,7 @@ pub fn run_tests(config: &Config) {
245246
old_io::test::raise_fd_limit();
246247
// Prevent issue #21352 UAC blocking .exe containing 'patch' etc. on Windows
247248
// If #11207 is resolved (adding manifest to .exe) this becomes unnecessary
248-
os::setenv("__COMPAT_LAYER", "RunAsInvoker");
249+
env::set_var("__COMPAT_LAYER", "RunAsInvoker");
249250
let res = test::run_tests_console(&opts, tests.into_iter().collect());
250251
match res {
251252
Ok(true) => {}
@@ -276,7 +277,7 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
276277
config.src_base.display());
277278
let mut tests = Vec::new();
278279
let dirs = fs::readdir(&config.src_base).unwrap();
279-
for file in dirs.iter() {
280+
for file in &dirs {
280281
let file = file.clone();
281282
debug!("inspecting file {:?}", file.display());
282283
if is_test(config, &file) {
@@ -304,13 +305,13 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
304305

305306
let mut valid = false;
306307

307-
for ext in valid_extensions.iter() {
308+
for ext in &valid_extensions {
308309
if name.ends_with(ext.as_slice()) {
309310
valid = true;
310311
}
311312
}
312313

313-
for pre in invalid_prefixes.iter() {
314+
for pre in &invalid_prefixes {
314315
if name.starts_with(pre.as_slice()) {
315316
valid = false;
316317
}

branches/tmp/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-
1u => (strs.pop().unwrap(), "".to_string()),
304-
2u => {
303+
1 => (strs.pop().unwrap(), "".to_string()),
304+
2 => {
305305
let end = strs.pop().unwrap();
306306
(strs.pop().unwrap(), end)
307307
}

branches/tmp/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.into_iter() {
43+
for (key, val) in env {
4444
cmd.env(key, val);
4545
}
4646

4747
match cmd.spawn() {
4848
Ok(mut process) => {
49-
for input in input.iter() {
49+
if let Some(input) = input {
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.into_iter() {
75+
for (key, val) in env {
7676
cmd.env(key, val);
7777
}
7878

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

branches/tmp/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::os;
34+
use std::env;
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() - 2u].clone() }
233+
None => { srcs[srcs.len() - 2].clone() }
234234
};
235-
let mut actual = srcs[srcs.len() - 1u].clone();
235+
let mut actual = srcs[srcs.len() - 1].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.iter() {
550+
for line in &breakpoint_lines {
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.iter() {
686+
for line in &breakpoint_lines {
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.iter() {
692+
for line in &commands {
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 = 0u;
845+
let mut i = 0;
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].iter() {
850+
for frag in &check_fragments[i] {
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 += 1u;
872+
i += 1;
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 = 0u;
895+
let mut next_err_idx = 0;
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 += 1u;
901+
next_err_idx += 1;
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() == 1u {
913+
if missing_patterns.len() == 1 {
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.iter() {
918+
for pattern in missing_patterns {
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.iter() {
938+
for pat in &props.forbid_output {
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 = 0u;
1028+
let mut i = 0;
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 = 0u;
1087+
let mut needle_i = 0;
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.iter() {
1176+
for rel_ab in &props.aux_builds {
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 !os::consts::EXE_SUFFIX.is_empty() {
1301+
if !env::consts::EXE_SUFFIX.is_empty() {
13021302
let mut fname = f.filename().unwrap().to_vec();
1303-
fname.extend(os::consts::EXE_SUFFIX.bytes());
1303+
fname.extend(env::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.into_iter() {
1506+
for (key, val) in env {
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.iter() {
1513+
for tv in &args.args {
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.iter() {
1594+
for file in &dirs {
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)