Skip to content

Commit 43afd4a

Browse files
committed
---
yaml --- r: 107982 b: refs/heads/dist-snap c: 4509b49 h: refs/heads/master v: v3
1 parent 58b5f92 commit 43afd4a

File tree

161 files changed

+6119
-5126
lines changed

Some content is hidden

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

161 files changed

+6119
-5126
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 50bdeb9a340e4d3568ec34dc86b220f8df32d2df
9+
refs/heads/dist-snap: 4509b49451cbd2e078fa81c6adb218ff33d6d779
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/mk/crates.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
# automatically generated for all stage/host/target combinations.
5050
################################################################################
5151

52-
TARGET_CRATES := std extra green rustuv native flate arena glob term
52+
TARGET_CRATES := std extra green rustuv native flate arena glob term semver uuid
5353
HOST_CRATES := syntax rustc rustdoc
5454
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5555
TOOLS := compiletest rustdoc rustc
@@ -66,6 +66,8 @@ DEPS_flate := std native:miniz
6666
DEPS_arena := std extra
6767
DEPS_glob := std
6868
DEPS_term := std
69+
DEPS_semver := std
70+
DEPS_uuid := std extra
6971

7072
TOOL_DEPS_compiletest := extra green rustuv
7173
TOOL_DEPS_rustdoc := rustdoc green rustuv

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,13 @@ pub fn run_tests(config: &config) {
234234
// For context, see #8904
235235
io::test::raise_fd_limit();
236236
let res = test::run_tests_console(&opts, tests);
237-
if !res { fail!("Some tests failed"); }
237+
match res {
238+
Ok(true) => {}
239+
Ok(false) => fail!("Some tests failed"),
240+
Err(e) => {
241+
println!("I/O failure during tests: {}", e);
242+
}
243+
}
238244
}
239245

240246
pub fn test_opts(config: &config) -> test::TestOpts {
@@ -255,7 +261,7 @@ pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
255261
debug!("making tests from {}",
256262
config.src_base.display());
257263
let mut tests = ~[];
258-
let dirs = fs::readdir(&config.src_base);
264+
let dirs = fs::readdir(&config.src_base).unwrap();
259265
for file in dirs.iter() {
260266
let file = file.clone();
261267
debug!("inspecting file {}", file.display());

branches/dist-snap/src/compiletest/procsrv.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ pub fn run(lib_path: &str,
5858
});
5959

6060
match opt_process {
61-
Some(ref mut process) => {
61+
Ok(ref mut process) => {
6262
for input in input.iter() {
63-
process.input().write(input.as_bytes());
63+
process.input().write(input.as_bytes()).unwrap();
6464
}
6565
let run::ProcessOutput { status, output, error } = process.finish_with_output();
6666

@@ -70,7 +70,7 @@ pub fn run(lib_path: &str,
7070
err: str::from_utf8_owned(error).unwrap()
7171
})
7272
},
73-
None => None
73+
Err(..) => None
7474
}
7575
}
7676

@@ -90,13 +90,13 @@ pub fn run_background(lib_path: &str,
9090
});
9191

9292
match opt_process {
93-
Some(mut process) => {
93+
Ok(mut process) => {
9494
for input in input.iter() {
95-
process.input().write(input.as_bytes());
95+
process.input().write(input.as_bytes()).unwrap();
9696
}
9797

9898
Some(process)
9999
},
100-
None => None
100+
Err(..) => None
101101
}
102102
}

branches/dist-snap/src/compiletest/runtest.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
153153
let rounds =
154154
match props.pp_exact { Some(_) => 1, None => 2 };
155155

156-
let src = File::open(testfile).read_to_end();
156+
let src = File::open(testfile).read_to_end().unwrap();
157157
let src = str::from_utf8_owned(src).unwrap();
158158
let mut srcs = ~[src];
159159

@@ -175,7 +175,7 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
175175
let mut expected = match props.pp_exact {
176176
Some(ref file) => {
177177
let filepath = testfile.dir_path().join(file);
178-
let s = File::open(&filepath).read_to_end();
178+
let s = File::open(&filepath).read_to_end().unwrap();
179179
str::from_utf8_owned(s).unwrap()
180180
}
181181
None => { srcs[srcs.len() - 2u].clone() }
@@ -318,8 +318,10 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
318318
//waiting 1 second for gdbserver start
319319
timer::sleep(1000);
320320
let result = task::try(proc() {
321-
tcp::TcpStream::connect(
322-
SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 5039 });
321+
tcp::TcpStream::connect(SocketAddr {
322+
ip: Ipv4Addr(127, 0, 0, 1),
323+
port: 5039,
324+
}).unwrap();
323325
});
324326
if result.is_err() {
325327
continue;
@@ -361,7 +363,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
361363
stdout: out,
362364
stderr: err,
363365
cmdline: cmdline};
364-
process.force_destroy();
366+
process.force_destroy().unwrap();
365367
}
366368

367369
_=> {
@@ -727,7 +729,7 @@ fn compose_and_run_compiler(
727729

728730
fn ensure_dir(path: &Path) {
729731
if path.is_dir() { return; }
730-
fs::mkdir(path, io::UserRWX);
732+
fs::mkdir(path, io::UserRWX).unwrap();
731733
}
732734

733735
fn compose_and_run(config: &config, testfile: &Path,
@@ -852,7 +854,7 @@ fn dump_output(config: &config, testfile: &Path, out: &str, err: &str) {
852854
fn dump_output_file(config: &config, testfile: &Path,
853855
out: &str, extension: &str) {
854856
let outfile = make_out_name(config, testfile, extension);
855-
File::create(&outfile).write(out.as_bytes());
857+
File::create(&outfile).write(out.as_bytes()).unwrap();
856858
}
857859

858860
fn make_out_name(config: &config, testfile: &Path, extension: &str) -> Path {
@@ -1003,7 +1005,7 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
10031005
fn _arm_push_aux_shared_library(config: &config, testfile: &Path) {
10041006
let tdir = aux_output_dir_name(config, testfile);
10051007

1006-
let dirs = fs::readdir(&tdir);
1008+
let dirs = fs::readdir(&tdir).unwrap();
10071009
for file in dirs.iter() {
10081010
if file.extension_str() == Some("so") {
10091011
// FIXME (#9639): This needs to handle non-utf8 paths
@@ -1099,7 +1101,7 @@ fn disassemble_extract(config: &config, _props: &TestProps,
10991101

11001102

11011103
fn count_extracted_lines(p: &Path) -> uint {
1102-
let x = File::open(&p.with_extension("ll")).read_to_end();
1104+
let x = File::open(&p.with_extension("ll")).read_to_end().unwrap();
11031105
let x = str::from_utf8_owned(x).unwrap();
11041106
x.lines().len()
11051107
}

branches/dist-snap/src/doc/guide-conditions.md

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ An example program that does this task reads like this:
4747
# #[allow(unused_imports)];
4848
use std::io::{BufferedReader, File};
4949
# mod BufferedReader {
50-
# use std::io::File;
50+
# use std::io::{File, IoResult};
5151
# use std::io::MemReader;
5252
# use std::io::BufferedReader;
5353
# static s : &'static [u8] = bytes!("1 2\n\
5454
# 34 56\n\
5555
# 789 123\n\
5656
# 45 67\n\
5757
# ");
58-
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
58+
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
5959
# BufferedReader::new(MemReader::new(s.to_owned()))
6060
# }
6161
# }
@@ -71,7 +71,6 @@ fn read_int_pairs() -> ~[(int,int)] {
7171
let mut pairs = ~[];
7272
7373
// Path takes a generic by-value, rather than by reference
74-
# let _g = std::io::ignore_io_error();
7574
let path = Path::new(&"foo.txt");
7675
let mut reader = BufferedReader::new(File::open(&path));
7776
@@ -245,15 +244,15 @@ and trapping its exit status using `task::try`:
245244
use std::io::{BufferedReader, File};
246245
use std::task;
247246
# mod BufferedReader {
248-
# use std::io::File;
247+
# use std::io::{File, IoResult};
249248
# use std::io::MemReader;
250249
# use std::io::BufferedReader;
251250
# static s : &'static [u8] = bytes!("1 2\n\
252251
# 34 56\n\
253252
# 789 123\n\
254253
# 45 67\n\
255254
# ");
256-
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
255+
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
257256
# BufferedReader::new(MemReader::new(s.to_owned()))
258257
# }
259258
# }
@@ -277,7 +276,6 @@ fn main() {
277276
278277
fn read_int_pairs() -> ~[(int,int)] {
279278
let mut pairs = ~[];
280-
# let _g = std::io::ignore_io_error();
281279
let path = Path::new(&"foo.txt");
282280
283281
let mut reader = BufferedReader::new(File::open(&path));
@@ -347,15 +345,15 @@ but similarly clear as the version that used `fail!` in the logic where the erro
347345
# #[allow(unused_imports)];
348346
use std::io::{BufferedReader, File};
349347
# mod BufferedReader {
350-
# use std::io::File;
348+
# use std::io::{File, IoResult};
351349
# use std::io::MemReader;
352350
# use std::io::BufferedReader;
353351
# static s : &'static [u8] = bytes!("1 2\n\
354352
# 34 56\n\
355353
# 789 123\n\
356354
# 45 67\n\
357355
# ");
358-
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
356+
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
359357
# BufferedReader::new(MemReader::new(s.to_owned()))
360358
# }
361359
# }
@@ -374,7 +372,6 @@ fn main() {
374372
375373
fn read_int_pairs() -> ~[(int,int)] {
376374
let mut pairs = ~[];
377-
# let _g = std::io::ignore_io_error();
378375
let path = Path::new(&"foo.txt");
379376
380377
let mut reader = BufferedReader::new(File::open(&path));
@@ -415,15 +412,15 @@ and replaces bad input lines with the pair `(-1,-1)`:
415412
# #[allow(unused_imports)];
416413
use std::io::{BufferedReader, File};
417414
# mod BufferedReader {
418-
# use std::io::File;
415+
# use std::io::{File, IoResult};
419416
# use std::io::MemReader;
420417
# use std::io::BufferedReader;
421418
# static s : &'static [u8] = bytes!("1 2\n\
422419
# 34 56\n\
423420
# 789 123\n\
424421
# 45 67\n\
425422
# ");
426-
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
423+
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
427424
# BufferedReader::new(MemReader::new(s.to_owned()))
428425
# }
429426
# }
@@ -447,7 +444,6 @@ fn main() {
447444
448445
fn read_int_pairs() -> ~[(int,int)] {
449446
let mut pairs = ~[];
450-
# let _g = std::io::ignore_io_error();
451447
let path = Path::new(&"foo.txt");
452448
453449
let mut reader = BufferedReader::new(File::open(&path));
@@ -489,15 +485,15 @@ Changing the condition's return type from `(int,int)` to `Option<(int,int)>` wil
489485
# #[allow(unused_imports)];
490486
use std::io::{BufferedReader, File};
491487
# mod BufferedReader {
492-
# use std::io::File;
488+
# use std::io::{IoResult, File};
493489
# use std::io::MemReader;
494490
# use std::io::BufferedReader;
495491
# static s : &'static [u8] = bytes!("1 2\n\
496492
# 34 56\n\
497493
# 789 123\n\
498494
# 45 67\n\
499495
# ");
500-
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
496+
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
501497
# BufferedReader::new(MemReader::new(s.to_owned()))
502498
# }
503499
# }
@@ -522,7 +518,6 @@ fn main() {
522518
523519
fn read_int_pairs() -> ~[(int,int)] {
524520
let mut pairs = ~[];
525-
# let _g = std::io::ignore_io_error();
526521
let path = Path::new(&"foo.txt");
527522
528523
let mut reader = BufferedReader::new(File::open(&path));
@@ -573,15 +568,15 @@ This can be encoded in the handler API by introducing a helper type: `enum Malfo
573568
# #[allow(unused_imports)];
574569
use std::io::{BufferedReader, File};
575570
# mod BufferedReader {
576-
# use std::io::File;
571+
# use std::io::{File, IoResult};
577572
# use std::io::MemReader;
578573
# use std::io::BufferedReader;
579574
# static s : &'static [u8] = bytes!("1 2\n\
580575
# 34 56\n\
581576
# 789 123\n\
582577
# 45 67\n\
583578
# ");
584-
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
579+
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
585580
# BufferedReader::new(MemReader::new(s.to_owned()))
586581
# }
587582
# }
@@ -615,7 +610,6 @@ fn main() {
615610
616611
fn read_int_pairs() -> ~[(int,int)] {
617612
let mut pairs = ~[];
618-
# let _g = std::io::ignore_io_error();
619613
let path = Path::new(&"foo.txt");
620614
621615
let mut reader = BufferedReader::new(File::open(&path));
@@ -696,15 +690,15 @@ a second condition and a helper function will suffice:
696690
# #[allow(unused_imports)];
697691
use std::io::{BufferedReader, File};
698692
# mod BufferedReader {
699-
# use std::io::File;
693+
# use std::io::{File, IoResult};
700694
# use std::io::MemReader;
701695
# use std::io::BufferedReader;
702696
# static s : &'static [u8] = bytes!("1 2\n\
703697
# 34 56\n\
704698
# 789 123\n\
705699
# 45 67\n\
706700
# ");
707-
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
701+
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
708702
# BufferedReader::new(MemReader::new(s.to_owned()))
709703
# }
710704
# }
@@ -752,7 +746,6 @@ fn parse_int(x: &str) -> int {
752746
753747
fn read_int_pairs() -> ~[(int,int)] {
754748
let mut pairs = ~[];
755-
# let _g = std::io::ignore_io_error();
756749
let path = Path::new(&"foo.txt");
757750
758751
let mut reader = BufferedReader::new(File::open(&path));

branches/dist-snap/src/doc/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ li {list-style-type: none; }
4040
* [The `arena` allocation library](arena/index.html)
4141
* [The `flate` compression library](flate/index.html)
4242
* [The `glob` file path matching library](glob/index.html)
43+
* [The `semver` version collation library](semver/index.html)
4344
* [The `term` terminal-handling library](term/index.html)
45+
* [The UUID library](uuid/index.html)
4446

4547
# Tooling
4648

0 commit comments

Comments
 (0)