Skip to content

Commit ab5b623

Browse files
committed
---
yaml --- r: 53066 b: refs/heads/dist-snap c: 5336bf6 h: refs/heads/master v: v3
1 parent 228ee41 commit ab5b623

File tree

414 files changed

+2247
-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.

414 files changed

+2247
-3384
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 0ae74bef188fe4f1fff69c0fa85d308c40bce7f8
10+
refs/heads/dist-snap: 5336bf6addc7091ed303a06246b43b99dc0c5cd1
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/AUTHORS.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Benjamin Peterson <[email protected]>
2929
Bilal Husain <[email protected]>
3030
Bill Fallon <[email protected]>
3131
Brendan Eich <[email protected]>
32-
Brendan Zabarauskas <[email protected]>
3332
Brian Anderson <[email protected]>
3433
Brian J. Burg <[email protected]>
3534
Brian Leibig <[email protected]>
@@ -81,7 +80,6 @@ Jeff Muizelaar <[email protected]>
8180
Jeff Olson <[email protected]>
8281
Jeffrey Yasskin <[email protected]>
8382
Jens Nockert <[email protected]>
84-
Jesse Jones <[email protected]>
8583
Jesse Ruderman <[email protected]>
8684
Jim Blandy <[email protected]>
8785
@@ -107,7 +105,6 @@ Mahmut Bulut <[email protected]>
107105
Margaret Meyerhofer <[email protected]>
108106
Marijn Haverbeke <[email protected]>
109107
Mark Lacey <[email protected]>
110-
Mark Vian <[email protected]>
111108
Martin DeMello <[email protected]>
112109
Marvin Löbel <[email protected]>
113110
Matt Brubeck <[email protected]>
@@ -152,7 +149,6 @@ Tim Taubert <[email protected]>
152149
153150
Tomoki Aonuma <[email protected]>
154151
Tony Young <[email protected]>
155-
156152
Tycho Sci <[email protected]>
157153
Tyler Bindon <[email protected]>
158154
Viktor Dahl <[email protected]>

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

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ mod errors;
3333
use std::getopts;
3434
use std::test;
3535

36-
use core::{result, either};
36+
use core::result;
3737
use result::{Ok, Err};
3838

3939
use common::config;
@@ -70,7 +70,7 @@ pub fn parse_config(args: ~[~str]) -> config {
7070
let matches =
7171
&match getopts::getopts(args_, opts) {
7272
Ok(m) => m,
73-
Err(f) => fail!(getopts::fail_str(f))
73+
Err(f) => die!(getopts::fail_str(f))
7474
};
7575

7676
fn opt_path(m: &getopts::Matches, nm: ~str) -> Path {
@@ -133,7 +133,7 @@ pub fn str_mode(s: ~str) -> mode {
133133
~"run-pass" => mode_run_pass,
134134
~"pretty" => mode_pretty,
135135
~"debug-info" => mode_debug_info,
136-
_ => fail!(~"invalid mode")
136+
_ => die!(~"invalid mode")
137137
}
138138
}
139139

@@ -151,18 +151,14 @@ pub fn run_tests(config: config) {
151151
let opts = test_opts(config);
152152
let tests = make_tests(config);
153153
let res = test::run_tests_console(&opts, tests);
154-
if !res { fail!(~"Some tests failed"); }
154+
if !res { die!(~"Some tests failed"); }
155155
}
156156

157157
pub fn test_opts(config: config) -> test::TestOpts {
158158
test::TestOpts {
159159
filter: config.filter,
160160
run_ignored: config.run_ignored,
161-
logfile: copy config.logfile,
162-
run_tests: true,
163-
run_benchmarks: false,
164-
save_results: option::None,
165-
compare_results: option::None
161+
logfile: config.logfile.map(|s| s.to_str()),
166162
}
167163
}
168164

@@ -214,15 +210,13 @@ pub fn make_test(config: config, testfile: &Path) -> test::TestDescAndFn {
214210
}
215211
}
216212

217-
pub fn make_test_name(config: config, testfile: &Path) -> test::TestName {
218-
test::DynTestName(fmt!("[%s] %s",
219-
mode_str(config.mode),
220-
testfile.to_str()))
213+
pub fn make_test_name(config: config, testfile: &Path) -> ~str {
214+
fmt!("[%s] %s", mode_str(config.mode), testfile.to_str())
221215
}
222216

223217
pub fn make_test_closure(config: config, testfile: &Path) -> test::TestFn {
224218
let testfile = testfile.to_str();
225-
test::DynTestFn(fn~() { runtest::run(config, testfile) })
219+
fn~() { runtest::run(config, testfile) }
226220
}
227221

228222
// Local Variables:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ fn parse_exec_env(line: ~str) -> Option<(~str, ~str)> {
145145
match strs.len() {
146146
1u => (strs[0], ~""),
147147
2u => (strs[0], strs[1]),
148-
n => fail!(fmt!("Expected 1 or 2 strings, not %u", n))
148+
n => die!(fmt!("Expected 1 or 2 strings, not %u", n))
149149
}
150150
}
151151
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn run(lib_path: ~str,
7171
os::close(pipe_in.out);
7272
os::close(pipe_out.in);
7373
os::close(pipe_err.in);
74-
fail!();
74+
die!();
7575
}
7676

7777

@@ -99,7 +99,7 @@ pub fn run(lib_path: ~str,
9999
(2, s) => {
100100
errs = s;
101101
}
102-
_ => { fail!() }
102+
_ => { die!() }
103103
};
104104
count -= 1;
105105
};

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ actual:\n\
202202
\n",
203203
expected, actual);
204204
io::stdout().write_str(msg);
205-
fail!();
205+
die!();
206206
}
207207
}
208208

@@ -322,8 +322,8 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
322322
ProcRes: ProcRes) {
323323

324324
// true if we found the error in question
325-
let mut found_flags = vec::from_elem(
326-
vec::len(expected_errors), false);
325+
let found_flags = vec::cast_to_mut(vec::from_elem(
326+
vec::len(expected_errors), false));
327327

328328
if ProcRes.status == 0 {
329329
fatal(~"process did not return an error status");
@@ -518,7 +518,7 @@ fn compose_and_run_compiler(
518518
fn ensure_dir(path: &Path) {
519519
if os::path_is_dir(path) { return; }
520520
if !os::make_dir(path, 0x1c0i32) {
521-
fail!(fmt!("can't make dir %s", path.to_str()));
521+
die!(fmt!("can't make dir %s", path.to_str()));
522522
}
523523
}
524524

@@ -668,7 +668,7 @@ fn maybe_dump_to_stdout(config: config, out: ~str, err: ~str) {
668668
669669
fn error(err: ~str) { io::stdout().write_line(fmt!("\nerror: %s", err)); }
670670
671-
fn fatal(err: ~str) -> ! { error(err); fail!(); }
671+
fn fatal(err: ~str) -> ! { error(err); die!(); }
672672
673673
fn fatal_ProcRes(err: ~str, ProcRes: ProcRes) -> ! {
674674
let msg =
@@ -686,5 +686,5 @@ stderr:\n\
686686
\n",
687687
err, ProcRes.cmdline, ProcRes.stdout, ProcRes.stderr);
688688
io::stdout().write_str(msg);
689-
fail!();
689+
die!();
690690
}

branches/dist-snap/src/etc/licenseck.py

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
# option. This file may not be copied, modified, or distributed
99
# except according to those terms.
1010

11-
license0 = """// Copyright 2012-2013 The Rust Project Developers. See the
11+
license0 = """\
12+
// Copyright 2012-2013 The Rust Project Developers. See the
1213
// COPYRIGHT file at the top-level directory of this distribution and at
1314
// http://rust-lang.org/COPYRIGHT.
1415
//
@@ -19,7 +20,8 @@
1920
// except according to those terms.
2021
"""
2122

22-
license1 = """// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
23+
license1 = """\
24+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2325
// file at the top-level directory of this distribution and at
2426
// http://rust-lang.org/COPYRIGHT.
2527
//
@@ -30,7 +32,8 @@
3032
// except according to those terms.
3133
"""
3234

33-
license2 = """// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
35+
license2 = """\
36+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
3437
// file at the top-level directory of this distribution and at
3538
// http://rust-lang.org/COPYRIGHT.
3639
//
@@ -41,7 +44,8 @@
4144
// except according to those terms.
4245
"""
4346

44-
license3 = """# Copyright 2013 The Rust Project Developers. See the COPYRIGHT
47+
license3 = """\
48+
# Copyright 2013 The Rust Project Developers. See the COPYRIGHT
4549
# file at the top-level directory of this distribution and at
4650
# http://rust-lang.org/COPYRIGHT.
4751
#
@@ -52,7 +56,19 @@
5256
# except according to those terms.
5357
"""
5458

55-
licenses = [license0, license1, license2, license3]
59+
license4 = """\
60+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
61+
// file at the top-level directory of this distribution and at
62+
// http://rust-lang.org/COPYRIGHT.
63+
//
64+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
65+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
66+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
67+
// option. This file may not be copied, modified, or distributed
68+
// except according to those terms.
69+
"""
70+
71+
licenses = [license0, license1, license2, license3, license4]
5672

5773
exceptions = [
5874
"rt/rust_android_dummy.cpp", # BSD, chromium

branches/dist-snap/src/libcargo/cargo.rc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ pub fn load_link(mis: ~[@ast::meta_item]) -> (Option<~str>,
295295
_ => { }
296296
}
297297
}
298-
_ => fail!(~"load_link: meta items must be name-values")
298+
_ => die!(~"load_link: meta items must be name-values")
299299
}
300300
}
301301
(name, vers, uuid)
@@ -332,7 +332,7 @@ pub fn load_crate(filename: &Path) -> Option<Crate> {
332332
}
333333
}
334334
_ => {
335-
fail!(~"crate attributes may not contain " +
335+
die!(~"crate attributes may not contain " +
336336
~"meta_words");
337337
}
338338
}
@@ -435,7 +435,7 @@ pub fn rest(s: ~str, start: uint) -> ~str {
435435
pub fn need_dir(s: &Path) {
436436
if os::path_is_dir(s) { return; }
437437
if !os::make_dir(s, 493_i32 /* oct: 755 */) {
438-
fail!(fmt!("can't make_dir %s", s.to_str()));
438+
die!(fmt!("can't make_dir %s", s.to_str()));
439439
}
440440
}
441441

@@ -453,14 +453,14 @@ pub fn valid_pkg_name(s: &str) -> bool {
453453

454454
pub fn parse_source(name: ~str, j: &json::Json) -> @Source {
455455
if !valid_pkg_name(name) {
456-
fail!(fmt!("'%s' is an invalid source name", name));
456+
die!(fmt!("'%s' is an invalid source name", name));
457457
}
458458

459459
match *j {
460460
json::Object(ref j) => {
461461
let mut url = match j.find(&~"url") {
462462
Some(&json::String(u)) => copy u,
463-
_ => fail!(~"needed 'url' field in source")
463+
_ => die!(~"needed 'url' field in source")
464464
};
465465
let method = match j.find(&~"method") {
466466
Some(&json::String(u)) => copy u,
@@ -485,7 +485,7 @@ pub fn parse_source(name: ~str, j: &json::Json) -> @Source {
485485
mut keyfp: keyfp,
486486
packages: DVec() };
487487
}
488-
_ => fail!(~"needed dict value in source")
488+
_ => die!(~"needed dict value in source")
489489
};
490490
}
491491

@@ -500,8 +500,8 @@ pub fn try_parse_sources(filename: &Path,
500500
debug!("source: %s", *k);
501501
}
502502
}
503-
Ok(_) => fail!(~"malformed sources.json"),
504-
Err(e) => fail!(fmt!("%s:%s", filename.to_str(), e.to_str()))
503+
Ok(_) => die!(~"malformed sources.json"),
504+
Err(e) => die!(fmt!("%s:%s", filename.to_str(), e.to_str()))
505505
}
506506
}
507507

@@ -662,7 +662,7 @@ pub fn build_cargo_options(argv: ~[~str]) -> Options {
662662
let matches = &match getopts::getopts(argv, opts()) {
663663
result::Ok(m) => m,
664664
result::Err(f) => {
665-
fail!(fmt!("%s", getopts::fail_str(f)));
665+
die!(fmt!("%s", getopts::fail_str(f)));
666666
}
667667
};
668668

@@ -675,10 +675,10 @@ pub fn build_cargo_options(argv: ~[~str]) -> Options {
675675
let is_install = len > 1u && matches.free[1] == ~"install";
676676
let is_uninstall = len > 1u && matches.free[1] == ~"uninstall";
677677

678-
if G && g { fail!(~"-G and -g both provided"); }
678+
if G && g { die!(~"-G and -g both provided"); }
679679

680680
if !is_install && !is_uninstall && (g || G) {
681-
fail!(~"-g and -G are only valid for `install` and `uninstall|rm`");
681+
die!(~"-g and -G are only valid for `install` and `uninstall|rm`");
682682
}
683683

684684
let mode =
@@ -845,7 +845,7 @@ pub fn install_source(c: &mut Cargo, path: &Path) {
845845
}
846846

847847
if vec::is_empty(cratefiles) {
848-
fail!(~"this doesn't look like a rust package (no .rc files)");
848+
die!(~"this doesn't look like a rust package (no .rc files)");
849849
}
850850

851851
for cratefiles.each |cf| {
@@ -889,7 +889,7 @@ pub fn install_curl(c: &mut Cargo, wd: &Path, url: ~str) {
889889
let p = run::program_output(~"curl", ~[~"-f", ~"-s", ~"-o",
890890
tarpath.to_str(), url]);
891891
if p.status != 0 {
892-
fail!(fmt!("fetch of %s failed: %s", url, p.err));
892+
die!(fmt!("fetch of %s failed: %s", url, p.err));
893893
}
894894
run::run_program(~"tar", ~[~"-x", ~"--strip-components=1",
895895
~"-C", wd.to_str(),
@@ -1123,7 +1123,7 @@ pub fn install_query(c: &mut Cargo, wd: &Path, target: ~str) {
11231123
pub fn get_temp_workdir(c: &Cargo) -> Path {
11241124
match tempfile::mkdtemp(&c.workdir, "cargo") {
11251125
Some(wd) => wd,
1126-
None => fail!(fmt!("needed temp dir: %s",
1126+
None => die!(fmt!("needed temp dir: %s",
11271127
c.workdir.to_str()))
11281128
}
11291129
}
@@ -1138,7 +1138,7 @@ pub fn cmd_install(c: &mut Cargo) {
11381138
wd.to_str()]);
11391139

11401140
if status != 0 {
1141-
fail!(fmt!("could not copy directory: %s", cwd.to_str()));
1141+
die!(fmt!("could not copy directory: %s", cwd.to_str()));
11421142
}
11431143

11441144
install_source(c, &wd);

branches/dist-snap/src/libcargo/pgp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub fn init(root: &Path) {
8787
p.input().write_str(signing_key());
8888
let s = p.finish();
8989
if s != 0 {
90-
fail!(~"pgp init failed");
90+
die!(~"pgp init failed");
9191
}
9292
}
9393
}
@@ -98,7 +98,7 @@ pub fn add(root: &Path, key: &Path) {
9898
run::program_output(~"gpg", ~[~"--homedir", path.to_str(),
9999
~"--import", key.to_str()]);
100100
if p.status != 0 {
101-
fail!(~"pgp add failed: " + p.out);
101+
die!(~"pgp add failed: " + p.out);
102102
}
103103
}
104104

branches/dist-snap/src/libcore/char.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ pub pure fn is_digit_radix(c: char, radix: uint) -> bool {
150150
#[inline]
151151
pub pure fn to_digit(c: char, radix: uint) -> Option<uint> {
152152
if radix > 36 {
153-
fail!(fmt!("to_digit: radix %? is to high (maximum 36)", radix));
153+
die!(fmt!("to_digit: radix %? is to high (maximum 36)", radix));
154154
}
155155
let val = match c {
156156
'0' .. '9' => c as uint - ('0' as uint),
@@ -173,7 +173,7 @@ pub pure fn to_digit(c: char, radix: uint) -> Option<uint> {
173173
#[inline]
174174
pub pure fn from_digit(num: uint, radix: uint) -> Option<char> {
175175
if radix > 36 {
176-
fail!(fmt!("from_digit: radix %? is to high (maximum 36)", num));
176+
die!(fmt!("from_digit: radix %? is to high (maximum 36)", num));
177177
}
178178
if num < radix {
179179
if num < 10 {

0 commit comments

Comments
 (0)