Skip to content

Commit 8e7a84b

Browse files
committed
Revert "Add private arg to fmt::UnsafeArg"
This reverts commit f5e4f78.
1 parent a479766 commit 8e7a84b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

library/core/src/fmt/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,9 @@ pub struct ArgumentV1<'a> {
270270
/// of `format_args!(..)` and reduce the scope of the `unsafe` block.
271271
#[allow(missing_debug_implementations)]
272272
#[doc(hidden)]
273+
#[non_exhaustive]
273274
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
274-
pub struct UnsafeArg {
275-
_private: (),
276-
}
275+
pub struct UnsafeArg;
277276

278277
impl UnsafeArg {
279278
/// See documentation where `UnsafeArg` is required to know when it is safe to
@@ -282,7 +281,7 @@ impl UnsafeArg {
282281
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
283282
#[inline(always)]
284283
pub unsafe fn new() -> Self {
285-
Self { _private: () }
284+
Self
286285
}
287286
}
288287

0 commit comments

Comments
 (0)