We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60ed659 commit 8779be3Copy full SHA for 8779be3
src/libstd/clone.rs
@@ -56,6 +56,18 @@ impl<'self, T> Clone for &'self T {
56
fn clone(&self) -> &'self T { *self }
57
}
58
59
+impl<'self, T> Clone for &'self [T] {
60
+ /// Return a shallow copy of the slice.
61
+ #[inline]
62
+ fn clone(&self) -> &'self [T] { *self }
63
+}
64
+
65
+impl<'self> Clone for &'self str {
66
67
68
+ fn clone(&self) -> &'self str { *self }
69
70
71
macro_rules! clone_impl(
72
($t:ty) => {
73
impl Clone for $t {
0 commit comments