about summary refs log tree commit diff
path: root/library/core/src/tuple.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/src/tuple.rs')
-rw-r--r--library/core/src/tuple.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/library/core/src/tuple.rs b/library/core/src/tuple.rs
index c57a8d81ade..58f81372aff 100644
--- a/library/core/src/tuple.rs
+++ b/library/core/src/tuple.rs
@@ -1,5 +1,6 @@
 // See core/src/primitive_docs.rs for documentation.
 
+use crate::cell::CloneFromCell;
 use crate::cmp::Ordering::{self, *};
 use crate::marker::{ConstParamTy_, StructuralPartialEq};
 use crate::ops::ControlFlow::{self, Break, Continue};
@@ -155,6 +156,15 @@ macro_rules! tuple_impls {
                 }
             }
         }
+
+        maybe_tuple_doc! {
+            $($T)+ @
+            // SAFETY: tuples introduce no additional indirection, so they can be copied whenever T
+            // can.
+            #[unstable(feature = "cell_get_cloned", issue = "145329")]
+            unsafe impl<$($T: CloneFromCell),+> CloneFromCell for ($($T,)+)
+            {}
+        }
     }
 }