Skip to content

Commit d42e603

Browse files
committedSep 7, 2019
Improve hygiene of alloc::format!
1 parent ef54f57 commit d42e603

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

‎src/liballoc/lib.rs

+6
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,9 @@ pub mod vec;
171171
mod std {
172172
pub use core::ops; // RangeFull
173173
}
174+
175+
#[doc(hidden)]
176+
#[unstable(feature = "liballoc_internals", issue = "0", reason = "implementation detail")]
177+
pub mod __export {
178+
pub use core::format_args;
179+
}

‎src/liballoc/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,5 @@ macro_rules! vec {
9898
#[macro_export]
9999
#[stable(feature = "rust1", since = "1.0.0")]
100100
macro_rules! format {
101-
($($arg:tt)*) => ($crate::fmt::format(::core::format_args!($($arg)*)))
101+
($($arg:tt)*) => ($crate::fmt::format($crate::__export::format_args!($($arg)*)))
102102
}

0 commit comments

Comments
 (0)