diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2021-09-30 12:06:30 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2021-09-30 12:32:05 -0500 |
| commit | f5e4f78eb7e3bad90b8dbbd20c58426817a4ffbf (patch) | |
| tree | b380ac4ec982bf6b59662cb81051e4a82409b3b4 | |
| parent | 6dc08b909b469d58dd8fa54c57ab193b8cf95257 (diff) | |
| download | rust-f5e4f78eb7e3bad90b8dbbd20c58426817a4ffbf.tar.gz rust-f5e4f78eb7e3bad90b8dbbd20c58426817a4ffbf.zip | |
Add private arg to fmt::UnsafeArg
| -rw-r--r-- | library/core/src/fmt/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index 3a0c19d7de5..31da3ef87b9 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -270,9 +270,10 @@ pub struct ArgumentV1<'a> { /// of `format_args!(..)` and reduce the scope of the `unsafe` block. #[allow(missing_debug_implementations)] #[doc(hidden)] -#[non_exhaustive] #[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")] -pub struct UnsafeArg; +pub struct UnsafeArg { + _private: (), +} impl UnsafeArg { /// 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")] #[inline(always)] pub unsafe fn new() -> Self { - Self + Self { _private: () } } } |
