From 24eddde45ffe58c9e71fae801fec937545570735 Mon Sep 17 00:00:00 2001 From: Jake Hughes Date: Mon, 13 Nov 2023 14:50:46 +0000 Subject: [PATCH] Make `FinalizerUnchecked` inner field public This wrapper struct has no runtime semantics (it exists only for a type to opt out of FSA) so there is no need to restrict access to its contents. --- library/core/src/gc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/gc.rs b/library/core/src/gc.rs index 11c5f51736e80..384245317c54d 100644 --- a/library/core/src/gc.rs +++ b/library/core/src/gc.rs @@ -62,7 +62,7 @@ impl DerefMut for NonFinalizable { #[unstable(feature = "gc", issue = "none")] #[cfg_attr(not(test), rustc_diagnostic_item = "FinalizeUnchecked")] #[derive(Debug, PartialEq, Eq, Clone)] -pub struct FinalizeUnchecked(T); +pub struct FinalizeUnchecked(pub T); impl FinalizeUnchecked { pub unsafe fn new(value: T) -> Self {