mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Rollup merge of #64060 - petrochenkov:unstdhyg, r=tmandry
Improve hygiene of `alloc::format!` `format` now uses `format_args` though a `__export` module, as described in https://github.com/rust-lang/rust/issues/63687#issuecomment-526254208. Fixes https://github.com/rust-lang/rust/issues/63687
This commit is contained in:
commit
e757d33e73
@ -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;
|
||||
}
|
||||
|
@ -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)*)))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user