Skip to content

Commit a9b8a04

Browse files
committed
---
yaml --- r: 178715 b: refs/heads/snap-stage3 c: e81ae40 h: refs/heads/master i: 178713: 47506f2 178711: 7ade4ff v: v3
1 parent 9edab17 commit a9b8a04

File tree

1,186 files changed

+12226
-12974
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,186 files changed

+12226
-12974
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 3d072a193bfcb76206aab576049e696d6d8db25d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: cfc91090e9676104b7a9a7c707ea70f0842ed6de
4+
refs/heads/snap-stage3: e81ae40770a74dbdeb70a5abcb41e1eb3cc2a584
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/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

branches/snap-stage3/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,12 @@ There is a lot more documentation in the [wiki].
110110

111111
The Rust community congregates in a few places:
112112

113-
* [StackOverflow] - Direct questions about using the language here.
114-
* [users.rust-lang.org] - General discussion, broader questions.
113+
* [StackOverflow] - Get help here.
114+
* [/r/rust] - General discussion.
115115
* [internals.rust-lang.org] - For development of the Rust language itself.
116-
* [/r/rust] - News and general discussion.
117116

118117
[StackOverflow]: http://stackoverflow.com/questions/tagged/rust
119118
[/r/rust]: http://reddit.com/r/rust
120-
[users.rust-lang.org]: http://users.rust-lang.org/
121119
[internals.rust-lang.org]: http://internals.rust-lang.org/
122120

123121
## License

branches/snap-stage3/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
;;

branches/snap-stage3/mk/cfg/x86_64-unknown-openbsd.mk

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

branches/snap-stage3/src/compiletest/common.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,17 @@ pub enum Mode {
2525
}
2626

2727
impl FromStr for Mode {
28-
type Err = ();
29-
fn from_str(s: &str) -> Result<Mode, ()> {
28+
fn from_str(s: &str) -> Option<Mode> {
3029
match s {
31-
"compile-fail" => Ok(CompileFail),
32-
"run-fail" => Ok(RunFail),
33-
"run-pass" => Ok(RunPass),
34-
"run-pass-valgrind" => Ok(RunPassValgrind),
35-
"pretty" => Ok(Pretty),
36-
"debuginfo-lldb" => Ok(DebugInfoLldb),
37-
"debuginfo-gdb" => Ok(DebugInfoGdb),
38-
"codegen" => Ok(Codegen),
39-
_ => Err(()),
30+
"compile-fail" => Some(CompileFail),
31+
"run-fail" => Some(RunFail),
32+
"run-pass" => Some(RunPass),
33+
"run-pass-valgrind" => Some(RunPassValgrind),
34+
"pretty" => Some(Pretty),
35+
"debuginfo-lldb" => Some(DebugInfoLldb),
36+
"debuginfo-gdb" => Some(DebugInfoGdb),
37+
"codegen" => Some(Codegen),
38+
_ => None,
4039
}
4140
}
4241
}

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
// except according to those terms.
1010

1111
#![crate_type = "bin"]
12-
12+
#![allow(unknown_features)]
13+
#![feature(slicing_syntax, unboxed_closures)]
1314
#![feature(box_syntax)]
14-
#![feature(collections)]
15-
#![feature(core)]
1615
#![feature(int_uint)]
17-
#![feature(io)]
18-
#![feature(os)]
19-
#![feature(path)]
16+
#![feature(test)]
2017
#![feature(rustc_private)]
21-
#![feature(slicing_syntax, unboxed_closures)]
2218
#![feature(std_misc)]
23-
#![feature(test)]
19+
#![feature(path)]
20+
#![feature(io)]
21+
#![feature(core)]
22+
#![feature(collections)]
23+
#![feature(os)]
2424
#![feature(unicode)]
25-
#![feature(env)]
2625

26+
#![allow(unstable)]
2727
#![deny(warnings)]
2828

2929
extern crate test;
@@ -32,9 +32,10 @@ extern crate getopts;
3232
#[macro_use]
3333
extern crate log;
3434

35-
use std::env;
35+
use std::os;
3636
use std::old_io;
3737
use std::old_io::fs;
38+
use std::str::FromStr;
3839
use std::thunk::Thunk;
3940
use getopts::{optopt, optflag, reqopt};
4041
use common::Config;
@@ -49,7 +50,7 @@ pub mod common;
4950
pub mod errors;
5051

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

5556
if config.valgrind_path.is_none() && config.force_valgrind {
@@ -139,7 +140,9 @@ pub fn parse_config(args: Vec<String> ) -> Config {
139140
build_base: opt_path(matches, "build-base"),
140141
aux_base: opt_path(matches, "aux-base"),
141142
stage_id: matches.opt_str("stage-id").unwrap(),
142-
mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"),
143+
mode: FromStr::from_str(matches.opt_str("mode")
144+
.unwrap()
145+
.as_slice()).expect("invalid mode"),
143146
run_ignored: matches.opt_present("ignored"),
144147
filter: filter,
145148
logfile: matches.opt_str("logfile").map(|s| Path::new(s)),
@@ -225,15 +228,15 @@ pub fn run_tests(config: &Config) {
225228
//arm-linux-androideabi debug-info test uses remote debugger
226229
//so, we test 1 task at once.
227230
// also trying to isolate problems with adb_run_wrapper.sh ilooping
228-
env::set_var("RUST_TEST_TASKS","1");
231+
os::setenv("RUST_TEST_TASKS","1");
229232
}
230233

231234
match config.mode {
232235
DebugInfoLldb => {
233236
// Some older versions of LLDB seem to have problems with multiple
234237
// instances running in parallel, so only run one test task at a
235238
// time.
236-
env::set_var("RUST_TEST_TASKS", "1");
239+
os::setenv("RUST_TEST_TASKS", "1");
237240
}
238241
_ => { /* proceed */ }
239242
}
@@ -246,7 +249,7 @@ pub fn run_tests(config: &Config) {
246249
old_io::test::raise_fd_limit();
247250
// Prevent issue #21352 UAC blocking .exe containing 'patch' etc. on Windows
248251
// If #11207 is resolved (adding manifest to .exe) this becomes unnecessary
249-
env::set_var("__COMPAT_LAYER", "RunAsInvoker");
252+
os::setenv("__COMPAT_LAYER", "RunAsInvoker");
250253
let res = test::run_tests_console(&opts, tests.into_iter().collect());
251254
match res {
252255
Ok(true) => {}
@@ -277,7 +280,7 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
277280
config.src_base.display());
278281
let mut tests = Vec::new();
279282
let dirs = fs::readdir(&config.src_base).unwrap();
280-
for file in &dirs {
283+
for file in dirs.iter() {
281284
let file = file.clone();
282285
debug!("inspecting file {:?}", file.display());
283286
if is_test(config, &file) {
@@ -305,13 +308,13 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
305308

306309
let mut valid = false;
307310

308-
for ext in &valid_extensions {
311+
for ext in valid_extensions.iter() {
309312
if name.ends_with(ext.as_slice()) {
310313
valid = true;
311314
}
312315
}
313316

314-
for pre in &invalid_prefixes {
317+
for pre in invalid_prefixes.iter() {
315318
if name.starts_with(pre.as_slice()) {
316319
valid = false;
317320
}

branches/snap-stage3/src/compiletest/header.rs

Lines changed: 5 additions & 5 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
}
@@ -352,8 +352,8 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
352352
panic!("{}", error_string);
353353
}
354354

355-
let major: int = components[0].parse().ok().expect(error_string);
356-
let minor: int = components[1].parse().ok().expect(error_string);
355+
let major: int = components[0].parse().expect(error_string);
356+
let minor: int = components[1].parse().expect(error_string);
357357

358358
return major * 1000 + minor;
359359
}
@@ -363,6 +363,6 @@ pub fn lldb_version_to_int(version_string: &str) -> int {
363363
"Encountered LLDB version string with unexpected format: {}",
364364
version_string);
365365
let error_string = error_string.as_slice();
366-
let major: int = version_string.parse().ok().expect(error_string);
366+
let major: int = version_string.parse().expect(error_string);
367367
return major;
368368
}

branches/snap-stage3/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

0 commit comments

Comments
 (0)