Skip to content

Commit 20072cc

Browse files
committed
---
yaml --- r: 95558 b: refs/heads/dist-snap c: daf5f5a h: refs/heads/master v: v3
1 parent 3eaa1cc commit 20072cc

File tree

728 files changed

+3077
-3087
lines changed

Some content is hidden

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

728 files changed

+3077
-3087
lines changed

[refs]

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

branches/dist-snap/CONTRIBUTING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
## How to submit a bug report
2-
3-
If you're just reporting a bug, please see:
4-
5-
https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
6-
71
## Pull request procedure
82

93
Pull requests should be targeted at Rust's `master` branch.

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,20 @@ pub fn parse_config(args: ~[~str]) -> config {
8585
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
8686
println(getopts::groups::usage(message, groups));
8787
println("");
88-
fail2!()
88+
fail!()
8989
}
9090

9191
let matches =
9292
&match getopts::groups::getopts(args_, groups) {
9393
Ok(m) => m,
94-
Err(f) => fail2!("{}", f.to_err_msg())
94+
Err(f) => fail!("{}", f.to_err_msg())
9595
};
9696

9797
if matches.opt_present("h") || matches.opt_present("help") {
9898
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
9999
println(getopts::groups::usage(message, groups));
100100
println("");
101-
fail2!()
101+
fail!()
102102
}
103103

104104
fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
@@ -203,7 +203,7 @@ pub fn str_mode(s: ~str) -> mode {
203203
~"pretty" => mode_pretty,
204204
~"debug-info" => mode_debug_info,
205205
~"codegen" => mode_codegen,
206-
_ => fail2!("invalid mode")
206+
_ => fail!("invalid mode")
207207
}
208208
}
209209

@@ -226,7 +226,7 @@ pub fn run_tests(config: &config) {
226226
// For context, see #8904
227227
rt::test::prepare_for_lots_of_tests();
228228
let res = test::run_tests_console(&opts, tests);
229-
if !res { fail2!("Some tests failed"); }
229+
if !res { fail!("Some tests failed"); }
230230
}
231231

232232
pub fn test_opts(config: &config) -> test::TestOpts {
@@ -244,13 +244,13 @@ pub fn test_opts(config: &config) -> test::TestOpts {
244244
}
245245

246246
pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
247-
debug2!("making tests from {}",
247+
debug!("making tests from {}",
248248
config.src_base.display());
249249
let mut tests = ~[];
250250
let dirs = os::list_dir_path(&config.src_base);
251251
for file in dirs.iter() {
252252
let file = file.clone();
253-
debug2!("inspecting file {}", file.display());
253+
debug!("inspecting file {}", file.display());
254254
if is_test(config, &file) {
255255
let t = do make_test(config, &file) {
256256
match config.mode {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
6161
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
6262
let msg = line.slice(idx, len).to_owned();
6363

64-
debug2!("line={} kind={} msg={}", line_num - adjust_line, kind, msg);
64+
debug!("line={} kind={} msg={}", line_num - adjust_line, kind, msg);
6565

6666
return ~[ExpectedError{line: line_num - adjust_line, kind: kind,
6767
msg: msg}];

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ fn parse_exec_env(line: &str) -> Option<(~str, ~str)> {
154154
let end = strs.pop();
155155
(strs.pop(), end)
156156
}
157-
n => fail2!("Expected 1 or 2 strings, not {}", n)
157+
n => fail!("Expected 1 or 2 strings, not {}", n)
158158
}
159159
}
160160
}
@@ -183,7 +183,7 @@ fn parse_name_value_directive(line: &str,
183183
Some(colon) => {
184184
let value = line.slice(colon + keycolon.len(),
185185
line.len()).to_owned();
186-
debug2!("{}: {}", directive, value);
186+
debug!("{}: {}", directive, value);
187187
Some(value)
188188
}
189189
None => None

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ pub fn run_metrics(config: config, testfile: ~str, mm: &mut MetricMap) {
6363
io::stdout().write_str("\n\n");
6464
}
6565
let testfile = Path::new(testfile);
66-
debug2!("running {}", testfile.display());
66+
debug!("running {}", testfile.display());
6767
let props = load_props(&testfile);
68-
debug2!("loaded props");
68+
debug!("loaded props");
6969
match config.mode {
7070
mode_compile_fail => run_cfail_test(&config, &props, &testfile),
7171
mode_run_fail => run_rfail_test(&config, &props, &testfile),
@@ -241,7 +241,7 @@ actual:\n\
241241
\n",
242242
expected, actual);
243243
io::stdout().write_str(msg);
244-
fail2!();
244+
fail!();
245245
}
246246
}
247247

@@ -289,7 +289,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
289289
let script_str = [~"set charset UTF-8",
290290
cmds,
291291
~"quit\n"].connect("\n");
292-
debug2!("script_str = {}", script_str);
292+
debug!("script_str = {}", script_str);
293293
dump_output_file(config, testfile, script_str, "debugger.script");
294294

295295
// run debugger script with gdb
@@ -348,10 +348,10 @@ fn check_error_patterns(props: &TestProps,
348348
let mut done = false;
349349
for line in ProcRes.stderr.line_iter() {
350350
if line.contains(*next_err_pat) {
351-
debug2!("found error pattern {}", *next_err_pat);
351+
debug!("found error pattern {}", *next_err_pat);
352352
next_err_idx += 1u;
353353
if next_err_idx == props.error_patterns.len() {
354-
debug2!("found all error patterns");
354+
debug!("found all error patterns");
355355
done = true;
356356
break;
357357
}
@@ -423,7 +423,7 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
423423
let mut was_expected = false;
424424
for (i, ee) in expected_errors.iter().enumerate() {
425425
if !found_flags[i] {
426-
debug2!("prefix={} ee.kind={} ee.msg={} line={}",
426+
debug!("prefix={} ee.kind={} ee.msg={} line={}",
427427
prefixes[i], ee.kind, ee.msg, line);
428428
if (prefix_matches(line, prefixes[i]) &&
429429
line.contains(ee.kind) &&
@@ -626,7 +626,7 @@ fn compose_and_run_compiler(
626626
fn ensure_dir(path: &Path) {
627627
if os::path_is_dir(path) { return; }
628628
if !os::make_dir(path, 0x1c0i32) {
629-
fail2!("can't make dir {}", path.display());
629+
fail!("can't make dir {}", path.display());
630630
}
631631
}
632632

@@ -784,7 +784,7 @@ fn maybe_dump_to_stdout(config: &config, out: &str, err: &str) {
784784
785785
fn error(err: ~str) { io::stdout().write_line(format!("\nerror: {}", err)); }
786786

787-
fn fatal(err: ~str) -> ! { error(err); fail2!(); }
787+
fn fatal(err: ~str) -> ! { error(err); fail!(); }
788788

789789
fn fatal_ProcRes(err: ~str, ProcRes: &ProcRes) -> ! {
790790
let msg =
@@ -802,7 +802,7 @@ stderr:\n\
802802
\n",
803803
err, ProcRes.cmdline, ProcRes.stdout, ProcRes.stderr);
804804
io::stdout().write_str(msg);
805-
fail2!();
805+
fail!();
806806
}
807807

808808
fn _arm_exec_compiled_test(config: &config, props: &TestProps,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub fn get_os(triple: &str) -> &'static str {
2929
return os
3030
}
3131
}
32-
fail2!("Cannot determine OS from triple");
32+
fail!("Cannot determine OS from triple");
3333
}
3434

3535
pub fn make_new_path(path: &str) -> ~str {
@@ -63,6 +63,6 @@ pub fn path_div() -> ~str { ~":" }
6363
pub fn path_div() -> ~str { ~";" }
6464
6565
pub fn logv(config: &config, s: ~str) {
66-
debug2!("{}", s);
66+
debug!("{}", s);
6767
if config.verbose { io::println(s); }
6868
}

branches/dist-snap/src/libextra/arc.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ impl<T:Send> MutexArc<T> {
255255
let inner = x.unwrap();
256256
let MutexArcInner { failed: failed, data: data, _ } = inner;
257257
if failed {
258-
fail2!("Can't unwrap poisoned MutexArc - another task failed inside!");
258+
fail!("Can't unwrap poisoned MutexArc - another task failed inside!");
259259
}
260260
data
261261
}
@@ -300,9 +300,9 @@ impl<T:Freeze + Send> MutexArc<T> {
300300
fn check_poison(is_mutex: bool, failed: bool) {
301301
if failed {
302302
if is_mutex {
303-
fail2!("Poisoned MutexArc - another task failed inside!");
303+
fail!("Poisoned MutexArc - another task failed inside!");
304304
} else {
305-
fail2!("Poisoned rw_arc - another task failed inside!");
305+
fail!("Poisoned rw_arc - another task failed inside!");
306306
}
307307
}
308308
}
@@ -505,7 +505,7 @@ impl<T:Freeze + Send> RWArc<T> {
505505
let inner = x.unwrap();
506506
let RWArcInner { failed: failed, data: data, _ } = inner;
507507
if failed {
508-
fail2!("Can't unwrap poisoned RWArc - another task failed inside!")
508+
fail!("Can't unwrap poisoned RWArc - another task failed inside!")
509509
}
510510
data
511511
}
@@ -619,7 +619,7 @@ mod tests {
619619
assert_eq!(arc_v.get()[2], 3);
620620
assert_eq!(arc_v.get()[4], 5);
621621

622-
info2!("{:?}", arc_v);
622+
info!("{:?}", arc_v);
623623
}
624624

625625
#[test]

branches/dist-snap/src/libextra/arena.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ unsafe fn destroy_chunk(chunk: &Chunk) {
127127

128128
let start = round_up_to(after_tydesc, align);
129129

130-
//debug2!("freeing object: idx = {}, size = {}, align = {}, done = {}",
130+
//debug!("freeing object: idx = {}, size = {}, align = {}, done = {}",
131131
// start, size, align, is_done);
132132
if is_done {
133133
((*tydesc).drop_glue)(ptr::offset(buf, start as int) as *i8);
@@ -176,7 +176,7 @@ impl Arena {
176176
}
177177
this.pod_head.fill = end;
178178

179-
//debug2!("idx = {}, size = {}, align = {}, fill = {}",
179+
//debug!("idx = {}, size = {}, align = {}, fill = {}",
180180
// start, n_bytes, align, head.fill);
181181

182182
ptr::offset(vec::raw::to_ptr(this.pod_head.data), start as int)
@@ -232,7 +232,7 @@ impl Arena {
232232
let head = transmute_mut_region(&mut self.head);
233233
head.fill = round_up_to(end, mem::pref_align_of::<*TyDesc>());
234234

235-
//debug2!("idx = {}, size = {}, align = {}, fill = {}",
235+
//debug!("idx = {}, size = {}, align = {}, fill = {}",
236236
// start, n_bytes, align, head.fill);
237237

238238
let buf = vec::raw::to_ptr(self.head.data);
@@ -305,6 +305,6 @@ fn test_arena_destructors_fail() {
305305
// Now, fail while allocating
306306
do arena.alloc::<@int> {
307307
// Now fail.
308-
fail2!();
308+
fail!();
309309
};
310310
}

branches/dist-snap/src/libextra/base64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl<'self> ToBase64 for &'self [u8] {
141141
v.push('=' as u8);
142142
}
143143
}
144-
_ => fail2!("Algebra is broken, please alert the math police")
144+
_ => fail!("Algebra is broken, please alert the math police")
145145
}
146146

147147
unsafe {

branches/dist-snap/src/libextra/bitv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ pub struct Bitv {
232232
}
233233

234234
fn die() -> ! {
235-
fail2!("Tried to do operation on bit vectors with different sizes");
235+
fail!("Tried to do operation on bit vectors with different sizes");
236236
}
237237

238238
impl Bitv {
@@ -1357,7 +1357,7 @@ mod tests {
13571357
let mut b = Bitv::new(14, true);
13581358
b.clear();
13591359
do b.ones |i| {
1360-
fail2!("found 1 at {:?}", i)
1360+
fail!("found 1 at {:?}", i)
13611361
};
13621362
}
13631363
@@ -1366,7 +1366,7 @@ mod tests {
13661366
let mut b = Bitv::new(140, true);
13671367
b.clear();
13681368
do b.ones |i| {
1369-
fail2!("found 1 at {:?}", i)
1369+
fail!("found 1 at {:?}", i)
13701370
};
13711371
}
13721372

branches/dist-snap/src/libextra/comm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ mod test {
179179
let (port, chan) = rendezvous();
180180
do spawn_unlinked {
181181
chan.duplex_stream.send(()); // Can't access this field outside this module
182-
fail2!()
182+
fail!()
183183
}
184184
port.recv()
185185
}
@@ -189,7 +189,7 @@ mod test {
189189
let (port, chan) = rendezvous();
190190
do spawn_unlinked {
191191
port.duplex_stream.recv();
192-
fail2!()
192+
fail!()
193193
}
194194
chan.try_send(());
195195
}
@@ -200,7 +200,7 @@ mod test {
200200
let (port, chan) = rendezvous();
201201
do spawn_unlinked {
202202
port.duplex_stream.recv();
203-
fail2!()
203+
fail!()
204204
}
205205
chan.send(());
206206
}

branches/dist-snap/src/libextra/crypto/cryptoutil.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,23 @@ impl ToBits for u64 {
109109
}
110110
}
111111

112-
/// Adds the specified number of bytes to the bit count. fail2!() if this would cause numeric
112+
/// Adds the specified number of bytes to the bit count. fail!() if this would cause numeric
113113
/// overflow.
114114
pub fn add_bytes_to_bits<T: Int + CheckedAdd + ToBits>(bits: T, bytes: T) -> T {
115115
let (new_high_bits, new_low_bits) = bytes.to_bits();
116116

117117
if new_high_bits > Zero::zero() {
118-
fail2!("Numeric overflow occured.")
118+
fail!("Numeric overflow occured.")
119119
}
120120

121121
match bits.checked_add(&new_low_bits) {
122122
Some(x) => return x,
123-
None => fail2!("Numeric overflow occured.")
123+
None => fail!("Numeric overflow occured.")
124124
}
125125
}
126126

127127
/// Adds the specified number of bytes to the bit count, which is a tuple where the first element is
128-
/// the high order value. fail2!() if this would cause numeric overflow.
128+
/// the high order value. fail!() if this would cause numeric overflow.
129129
pub fn add_bytes_to_bits_tuple
130130
<T: Int + Unsigned + CheckedAdd + ToBits>
131131
(bits: (T, T), bytes: T) -> (T, T) {
@@ -144,15 +144,15 @@ pub fn add_bytes_to_bits_tuple
144144
} else {
145145
match hi.checked_add(&new_high_bits) {
146146
Some(y) => return (y, x),
147-
None => fail2!("Numeric overflow occured.")
147+
None => fail!("Numeric overflow occured.")
148148
}
149149
}
150150
},
151151
None => {
152152
let one: T = One::one();
153153
let z = match new_high_bits.checked_add(&one) {
154154
Some(w) => w,
155-
None => fail2!("Numeric overflow occured.")
155+
None => fail!("Numeric overflow occured.")
156156
};
157157
match hi.checked_add(&z) {
158158
// This re-executes the addition that was already performed earlier when overflow
@@ -163,7 +163,7 @@ pub fn add_bytes_to_bits_tuple
163163
// be Unsigned - overflow is not defined for Signed types. This function could be
164164
// implemented for signed types as well if that were needed.
165165
Some(y) => return (y, low + new_low_bits),
166-
None => fail2!("Numeric overflow occured.")
166+
None => fail!("Numeric overflow occured.")
167167
}
168168
}
169169
}

0 commit comments

Comments
 (0)