Settle on the format/write/print family of names
This commit is contained in:
parent
67512f717e
commit
eb836dd61e
10 changed files with 293 additions and 253 deletions
|
@ -940,6 +940,7 @@ pub fn std_macros() -> @str {
|
|||
);
|
||||
)
|
||||
|
||||
// NOTE(acrichto): start removing this after the next snapshot
|
||||
macro_rules! printf (
|
||||
($arg:expr) => (
|
||||
print(fmt!(\"%?\", $arg))
|
||||
|
@ -949,6 +950,7 @@ pub fn std_macros() -> @str {
|
|||
)
|
||||
)
|
||||
|
||||
// NOTE(acrichto): start removing this after the next snapshot
|
||||
macro_rules! printfln (
|
||||
($arg:expr) => (
|
||||
println(fmt!(\"%?\", $arg))
|
||||
|
@ -958,6 +960,21 @@ pub fn std_macros() -> @str {
|
|||
)
|
||||
)
|
||||
|
||||
// FIXME(#6846) once stdio is redesigned, this shouldn't perform an
|
||||
// allocation but should rather delegate to an invocation of
|
||||
// write! instead of format!
|
||||
macro_rules! print (
|
||||
() => ();
|
||||
($arg:expr) => ( ::std::io::print(format!(\"{}\", $arg)));
|
||||
($fmt:expr, $($arg:tt)+) => ( ::std::io::print(format!($fmt, $($arg)+)))
|
||||
)
|
||||
|
||||
// FIXME(#6846) once stdio is redesigned, this shouldn't perform an
|
||||
// allocation but should rather delegate to an io::Writer
|
||||
macro_rules! println (
|
||||
($($arg:tt)*) => ({ print!($($arg)*); ::std::io::println(\"\"); })
|
||||
)
|
||||
|
||||
// NOTE: use this after a snapshot lands to abstract the details
|
||||
// of the TLS interface.
|
||||
macro_rules! local_data_key (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue