Add private arg to fmt::UnsafeArg
This commit is contained in:
parent
6dc08b909b
commit
f5e4f78eb7
@ -270,9 +270,10 @@ pub struct ArgumentV1<'a> {
|
|||||||
/// of `format_args!(..)` and reduce the scope of the `unsafe` block.
|
/// of `format_args!(..)` and reduce the scope of the `unsafe` block.
|
||||||
#[allow(missing_debug_implementations)]
|
#[allow(missing_debug_implementations)]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[non_exhaustive]
|
|
||||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
|
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
|
||||||
pub struct UnsafeArg;
|
pub struct UnsafeArg {
|
||||||
|
_private: (),
|
||||||
|
}
|
||||||
|
|
||||||
impl UnsafeArg {
|
impl UnsafeArg {
|
||||||
/// See documentation where `UnsafeArg` is required to know when it is safe to
|
/// See documentation where `UnsafeArg` is required to know when it is safe to
|
||||||
@ -281,7 +282,7 @@ impl UnsafeArg {
|
|||||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
|
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub unsafe fn new() -> Self {
|
pub unsafe fn new() -> Self {
|
||||||
Self
|
Self { _private: () }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user