Skip to content

Commit ddc5f9f

Browse files
committed
---
yaml --- r: 148875 b: refs/heads/try2 c: fdb820a h: refs/heads/master i: 148873: aff4fbc 148871: a5441fe v: v3
1 parent 7a49f53 commit ddc5f9f

File tree

144 files changed

+4757
-5959
lines changed

Some content is hidden

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

144 files changed

+4757
-5959
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: d42521aa92006a3378c535adec80ae2257bff083
8+
refs/heads/try2: fdb820a1be9d28220a2e509b1f29e5381516c9ee
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/crates.mk

Lines changed: 2 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
5353
HOST_CRATES := syntax rustc rustdoc
5454
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5555
TOOLS := compiletest rustdoc rustc
@@ -66,6 +66,7 @@ DEPS_flate := std native:miniz
6666
DEPS_arena := std extra
6767
DEPS_glob := std
6868
DEPS_term := std
69+
DEPS_semver := std
6970

7071
TOOL_DEPS_compiletest := extra green rustuv
7172
TOOL_DEPS_rustdoc := rustdoc green rustuv

branches/try2/src/compiletest/compiletest.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,7 @@ 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-
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-
}
237+
if !res { fail!("Some tests failed"); }
244238
}
245239

246240
pub fn test_opts(config: &config) -> test::TestOpts {
@@ -261,7 +255,7 @@ pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
261255
debug!("making tests from {}",
262256
config.src_base.display());
263257
let mut tests = ~[];
264-
let dirs = fs::readdir(&config.src_base).unwrap();
258+
let dirs = fs::readdir(&config.src_base);
265259
for file in dirs.iter() {
266260
let file = file.clone();
267261
debug!("inspecting file {}", file.display());

branches/try2/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-
Ok(ref mut process) => {
61+
Some(ref mut process) => {
6262
for input in input.iter() {
63-
process.input().write(input.as_bytes()).unwrap();
63+
process.input().write(input.as_bytes());
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-
Err(..) => None
73+
None => None
7474
}
7575
}
7676

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

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

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

branches/try2/src/compiletest/runtest.rs

Lines changed: 9 additions & 11 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().unwrap();
156+
let src = File::open(testfile).read_to_end();
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().unwrap();
178+
let s = File::open(&filepath).read_to_end();
179179
str::from_utf8_owned(s).unwrap()
180180
}
181181
None => { srcs[srcs.len() - 2u].clone() }
@@ -318,10 +318,8 @@ 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(SocketAddr {
322-
ip: Ipv4Addr(127, 0, 0, 1),
323-
port: 5039,
324-
}).unwrap();
321+
tcp::TcpStream::connect(
322+
SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 5039 });
325323
});
326324
if result.is_err() {
327325
continue;
@@ -363,7 +361,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
363361
stdout: out,
364362
stderr: err,
365363
cmdline: cmdline};
366-
process.force_destroy().unwrap();
364+
process.force_destroy();
367365
}
368366

369367
_=> {
@@ -729,7 +727,7 @@ fn compose_and_run_compiler(
729727

730728
fn ensure_dir(path: &Path) {
731729
if path.is_dir() { return; }
732-
fs::mkdir(path, io::UserRWX).unwrap();
730+
fs::mkdir(path, io::UserRWX);
733731
}
734732

735733
fn compose_and_run(config: &config, testfile: &Path,
@@ -854,7 +852,7 @@ fn dump_output(config: &config, testfile: &Path, out: &str, err: &str) {
854852
fn dump_output_file(config: &config, testfile: &Path,
855853
out: &str, extension: &str) {
856854
let outfile = make_out_name(config, testfile, extension);
857-
File::create(&outfile).write(out.as_bytes()).unwrap();
855+
File::create(&outfile).write(out.as_bytes());
858856
}
859857

860858
fn make_out_name(config: &config, testfile: &Path, extension: &str) -> Path {
@@ -1005,7 +1003,7 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
10051003
fn _arm_push_aux_shared_library(config: &config, testfile: &Path) {
10061004
let tdir = aux_output_dir_name(config, testfile);
10071005

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

11021100

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

branches/try2/src/doc/guide-conditions.md

Lines changed: 21 additions & 14 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, IoResult};
50+
# use std::io::File;
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: IoResult<File>) -> BufferedReader<MemReader> {
58+
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
5959
# BufferedReader::new(MemReader::new(s.to_owned()))
6060
# }
6161
# }
@@ -71,6 +71,7 @@ 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();
7475
let path = Path::new(&"foo.txt");
7576
let mut reader = BufferedReader::new(File::open(&path));
7677
@@ -244,15 +245,15 @@ and trapping its exit status using `task::try`:
244245
use std::io::{BufferedReader, File};
245246
use std::task;
246247
# mod BufferedReader {
247-
# use std::io::{File, IoResult};
248+
# use std::io::File;
248249
# use std::io::MemReader;
249250
# use std::io::BufferedReader;
250251
# static s : &'static [u8] = bytes!("1 2\n\
251252
# 34 56\n\
252253
# 789 123\n\
253254
# 45 67\n\
254255
# ");
255-
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
256+
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
256257
# BufferedReader::new(MemReader::new(s.to_owned()))
257258
# }
258259
# }
@@ -276,6 +277,7 @@ fn main() {
276277
277278
fn read_int_pairs() -> ~[(int,int)] {
278279
let mut pairs = ~[];
280+
# let _g = std::io::ignore_io_error();
279281
let path = Path::new(&"foo.txt");
280282
281283
let mut reader = BufferedReader::new(File::open(&path));
@@ -345,15 +347,15 @@ but similarly clear as the version that used `fail!` in the logic where the erro
345347
# #[allow(unused_imports)];
346348
use std::io::{BufferedReader, File};
347349
# mod BufferedReader {
348-
# use std::io::{File, IoResult};
350+
# use std::io::File;
349351
# use std::io::MemReader;
350352
# use std::io::BufferedReader;
351353
# static s : &'static [u8] = bytes!("1 2\n\
352354
# 34 56\n\
353355
# 789 123\n\
354356
# 45 67\n\
355357
# ");
356-
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
358+
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
357359
# BufferedReader::new(MemReader::new(s.to_owned()))
358360
# }
359361
# }
@@ -372,6 +374,7 @@ fn main() {
372374
373375
fn read_int_pairs() -> ~[(int,int)] {
374376
let mut pairs = ~[];
377+
# let _g = std::io::ignore_io_error();
375378
let path = Path::new(&"foo.txt");
376379
377380
let mut reader = BufferedReader::new(File::open(&path));
@@ -412,15 +415,15 @@ and replaces bad input lines with the pair `(-1,-1)`:
412415
# #[allow(unused_imports)];
413416
use std::io::{BufferedReader, File};
414417
# mod BufferedReader {
415-
# use std::io::{File, IoResult};
418+
# use std::io::File;
416419
# use std::io::MemReader;
417420
# use std::io::BufferedReader;
418421
# static s : &'static [u8] = bytes!("1 2\n\
419422
# 34 56\n\
420423
# 789 123\n\
421424
# 45 67\n\
422425
# ");
423-
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
426+
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
424427
# BufferedReader::new(MemReader::new(s.to_owned()))
425428
# }
426429
# }
@@ -444,6 +447,7 @@ fn main() {
444447
445448
fn read_int_pairs() -> ~[(int,int)] {
446449
let mut pairs = ~[];
450+
# let _g = std::io::ignore_io_error();
447451
let path = Path::new(&"foo.txt");
448452
449453
let mut reader = BufferedReader::new(File::open(&path));
@@ -485,15 +489,15 @@ Changing the condition's return type from `(int,int)` to `Option<(int,int)>` wil
485489
# #[allow(unused_imports)];
486490
use std::io::{BufferedReader, File};
487491
# mod BufferedReader {
488-
# use std::io::{IoResult, File};
492+
# use std::io::File;
489493
# use std::io::MemReader;
490494
# use std::io::BufferedReader;
491495
# static s : &'static [u8] = bytes!("1 2\n\
492496
# 34 56\n\
493497
# 789 123\n\
494498
# 45 67\n\
495499
# ");
496-
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
500+
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
497501
# BufferedReader::new(MemReader::new(s.to_owned()))
498502
# }
499503
# }
@@ -518,6 +522,7 @@ fn main() {
518522
519523
fn read_int_pairs() -> ~[(int,int)] {
520524
let mut pairs = ~[];
525+
# let _g = std::io::ignore_io_error();
521526
let path = Path::new(&"foo.txt");
522527
523528
let mut reader = BufferedReader::new(File::open(&path));
@@ -568,15 +573,15 @@ This can be encoded in the handler API by introducing a helper type: `enum Malfo
568573
# #[allow(unused_imports)];
569574
use std::io::{BufferedReader, File};
570575
# mod BufferedReader {
571-
# use std::io::{File, IoResult};
576+
# use std::io::File;
572577
# use std::io::MemReader;
573578
# use std::io::BufferedReader;
574579
# static s : &'static [u8] = bytes!("1 2\n\
575580
# 34 56\n\
576581
# 789 123\n\
577582
# 45 67\n\
578583
# ");
579-
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
584+
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
580585
# BufferedReader::new(MemReader::new(s.to_owned()))
581586
# }
582587
# }
@@ -610,6 +615,7 @@ fn main() {
610615
611616
fn read_int_pairs() -> ~[(int,int)] {
612617
let mut pairs = ~[];
618+
# let _g = std::io::ignore_io_error();
613619
let path = Path::new(&"foo.txt");
614620
615621
let mut reader = BufferedReader::new(File::open(&path));
@@ -690,15 +696,15 @@ a second condition and a helper function will suffice:
690696
# #[allow(unused_imports)];
691697
use std::io::{BufferedReader, File};
692698
# mod BufferedReader {
693-
# use std::io::{File, IoResult};
699+
# use std::io::File;
694700
# use std::io::MemReader;
695701
# use std::io::BufferedReader;
696702
# static s : &'static [u8] = bytes!("1 2\n\
697703
# 34 56\n\
698704
# 789 123\n\
699705
# 45 67\n\
700706
# ");
701-
# pub fn new(_inner: IoResult<File>) -> BufferedReader<MemReader> {
707+
# pub fn new(_inner: Option<File>) -> BufferedReader<MemReader> {
702708
# BufferedReader::new(MemReader::new(s.to_owned()))
703709
# }
704710
# }
@@ -746,6 +752,7 @@ fn parse_int(x: &str) -> int {
746752
747753
fn read_int_pairs() -> ~[(int,int)] {
748754
let mut pairs = ~[];
755+
# let _g = std::io::ignore_io_error();
749756
let path = Path::new(&"foo.txt");
750757
751758
let mut reader = BufferedReader::new(File::open(&path));

branches/try2/src/doc/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ 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)
4445

4546
# Tooling

branches/try2/src/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ origin.y += 1.0; // ERROR: assigning to immutable field
624624
# let mypoint = Point { x: 0.0, y: 0.0 };
625625
match mypoint {
626626
Point { x: 0.0, y: yy } => println!("{}", yy),
627-
Point { x: xx, y: yy } => println!("{} {}", xx, yy)
627+
Point { x: xx, y: yy } => println!("{} {}", xx, yy),
628628
}
629629
~~~~
630630

@@ -639,7 +639,7 @@ reuses the field name as the binding name.
639639
# struct Point { x: f64, y: f64 }
640640
# let mypoint = Point { x: 0.0, y: 0.0 };
641641
match mypoint {
642-
Point { x, .. } => println!("{}", x)
642+
Point { x, .. } => println!("{}", x),
643643
}
644644
~~~
645645

branches/try2/src/etc/combine-tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def scrub(b):
6969
use run_pass_stage2::*;
7070
use std::io;
7171
use std::io::Writer;
72-
#[allow(warnings)]
7372
fn main() {
7473
let mut out = io::stdout();
7574
"""

branches/try2/src/etc/licenseck.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"libstd/sync/mpsc_queue.rs", # BSD
4242
"libstd/sync/spsc_queue.rs", # BSD
4343
"libstd/sync/mpmc_bounded_queue.rs", # BSD
44-
"libextra/sync/mpsc_intrusive.rs", # BSD
4544
]
4645

4746
def check_license(name, contents):

0 commit comments

Comments
 (0)