Skip to content

Remove rtdebug_! and make rtdebug! work properly. #8419

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

Merged
merged 1 commit into from
Aug 13, 2013
Merged
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
16 changes: 4 additions & 12 deletions src/libstd/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,12 @@ macro_rules! rterrln (
} )
)

// Some basic logging
macro_rules! rtdebug_ (
($( $arg:expr),+) => ( {
rterrln!( $($arg),+ )
} )
)

// An alternate version with no output, for turning off logging. An
// earlier attempt that did not call the fmt! macro was insufficient,
// as a case of the "let bind each variable" approach eventually
// failed without an error message describing the invocation site.
// Some basic logging. Enabled by passing `--cfg rtdebug` to the libstd build.
macro_rules! rtdebug (
($( $arg:expr),+) => ( {
let _x = fmt!( $($arg),+ );
if cfg!(rtdebug) {
rterrln!( $($arg),+ )
}
})
)

Expand Down