]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/option.rs
Make some `Clone` impls `const`
[rust.git] / library / core / src / option.rs
index 7b9c6e43960f7b61a2e15931dd090ac1a2656ecb..941d7e07926281ebf5e47fc3ebaed21ded4d20c8 100644 (file)
@@ -1668,7 +1668,11 @@ const fn expect_failed(msg: &str) -> ! {
 /////////////////////////////////////////////////////////////////////////////
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<T: Clone> Clone for Option<T> {
+#[rustc_const_unstable(feature = "const_clone", issue = "91805")]
+impl<T> const Clone for Option<T>
+where
+    T: ~const Clone + ~const Drop,
+{
     #[inline]
     fn clone(&self) -> Self {
         match self {