Register new snapshots

This commit is contained in:
Alex Crichton
2014-12-29 19:40:57 -08:00
parent 023dfb0c89
commit 262c1efe63
20 changed files with 11 additions and 756 deletions

View File

@@ -112,25 +112,11 @@ impl fmt::FormatWriter for Stdio {
}
}
// NOTE(stage0): Remove cfg after a snapshot
#[cfg(not(stage0))]
pub fn dumb_print(args: fmt::Arguments) {
let _ = Stderr.write_fmt(args);
}
// NOTE(stage0): Remove function after a snapshot
#[cfg(stage0)]
pub fn dumb_print(args: &fmt::Arguments) {
let mut w = Stderr;
let _ = write!(&mut w, "{}", args);
}
// NOTE(stage0): Remove wrappers after a snapshot
#[cfg(not(stage0))] pub fn abort(args: fmt::Arguments) -> ! { abort_(&args) }
#[cfg(stage0)] pub fn abort(args: &fmt::Arguments) -> ! { abort_(args) }
// NOTE(stage0): Change to `pub fn abort(args: fmt::Arguments) -> !` after a snapshot
fn abort_(args: &fmt::Arguments) -> ! {
pub fn abort(args: fmt::Arguments) -> ! {
use fmt::FormatWriter;
struct BufWriter<'a> {