about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/core/src/cell/once.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/cell/once.rs b/library/core/src/cell/once.rs
index 097fa86c938..87df8a4e272 100644
--- a/library/core/src/cell/once.rs
+++ b/library/core/src/cell/once.rs
@@ -309,7 +309,8 @@ impl<T> OnceCell<T> {
     /// ```
     #[inline]
     #[stable(feature = "once_cell", since = "1.70.0")]
-    pub fn into_inner(self) -> Option<T> {
+    #[rustc_const_unstable(feature = "const_cell_into_inner", issue = "78729")]
+    pub const fn into_inner(self) -> Option<T> {
         // Because `into_inner` takes `self` by value, the compiler statically verifies
         // that it is not currently borrowed. So it is safe to move out `Option<T>`.
         self.inner.into_inner()