Skip to content

Remove dumb_println #16368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}