Improve hygiene of alloc::format!

This commit is contained in:
Vadim Petrochenkov 2019-09-01 14:10:50 +03:00
parent ef54f57c5b
commit d42e60331f
2 changed files with 7 additions and 1 deletions

View File

@ -171,3 +171,9 @@ pub mod vec;
mod std {
pub use core::ops; // RangeFull
}
#[doc(hidden)]
#[unstable(feature = "liballoc_internals", issue = "0", reason = "implementation detail")]
pub mod __export {
pub use core::format_args;
}

View File

@ -98,5 +98,5 @@ macro_rules! vec {
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
macro_rules! format {
($($arg:tt)*) => ($crate::fmt::format(::core::format_args!($($arg)*)))
($($arg:tt)*) => ($crate::fmt::format($crate::__export::format_args!($($arg)*)))
}