Skip to content

Commit

Permalink
Remove dumb_println
Browse files Browse the repository at this point in the history
After rust-lang#10965, which introduces no-context printing, this is no longer needed.

Fixes rust-lang#11043
  • Loading branch information
reem committed Aug 8, 2014
1 parent 87d2bf4 commit 36cf65c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
11 changes: 2 additions & 9 deletions src/libgreen/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@

#![macro_escape]

use std::fmt;

// Indicates whether we should perform expensive sanity checks, including rtassert!
// FIXME: Once the runtime matures remove the `true` below to turn off rtassert, etc.
pub static ENFORCE_SANITY: bool = true || !cfg!(rtopt) || cfg!(rtdebug) || cfg!(rtassert);

macro_rules! rterrln (
($($arg:tt)*) => ( {
format_args!(::macros::dumb_println, $($arg)*)
use std::io::stdio;
format_args!(stdio::println_args, $($arg)*)
} )
)

Expand Down Expand Up @@ -51,12 +50,6 @@ macro_rules! rtabort (
} )
)

pub fn dumb_println(args: &fmt::Arguments) {
use std::rt;
let mut w = rt::Stderr;
let _ = writeln!(&mut w, "{}", args);
}

pub fn abort(msg: &str) -> ! {
let msg = if !msg.is_empty() { msg } else { "aborted" };
let hash = msg.chars().fold(0, |accum, val| accum + (val as uint) );
Expand Down
10 changes: 2 additions & 8 deletions src/librustuv/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@

#![macro_escape]

use std::fmt;

macro_rules! uverrln (
($($arg:tt)*) => ( {
format_args!(::macros::dumb_println, $($arg)*)
use std::io::stdio;
format_args!(stdio::println_args, $($arg)*)
} )
)

Expand All @@ -27,8 +26,3 @@ macro_rules! uvdebug (
})
)

pub fn dumb_println(args: &fmt::Arguments) {
use std::rt;
let mut w = rt::Stderr;
let _ = writeln!(&mut w, "{}", args);
}

0 comments on commit 36cf65c

Please sign in to comment.