diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-09-01 14:10:50 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-09-07 22:40:57 +0300 |
| commit | d42e60331fb08efce78e7fc9739bf42620e51f8f (patch) | |
| tree | a9d87907bb85371802829d0ff61792a1fd8131b4 | |
| parent | ef54f57c5b9d894a38179d09b00610c1b337b086 (diff) | |
| download | rust-d42e60331fb08efce78e7fc9739bf42620e51f8f.tar.gz rust-d42e60331fb08efce78e7fc9739bf42620e51f8f.zip | |
Improve hygiene of `alloc::format!`
| -rw-r--r-- | src/liballoc/lib.rs | 6 | ||||
| -rw-r--r-- | src/liballoc/macros.rs | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 4a48945adc3..370e5cf4b30 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -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; +} diff --git a/src/liballoc/macros.rs b/src/liballoc/macros.rs index 0b5e186d4c7..2f2cdc39c63 100644 --- a/src/liballoc/macros.rs +++ b/src/liballoc/macros.rs @@ -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)*))) } |
