From 007651cd267ee8af88384d968183a1dee0265919 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 28 May 2013 16:35:52 -0500 Subject: Require documentation by default for libstd Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand. --- src/libstd/clone.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libstd/clone.rs') diff --git a/src/libstd/clone.rs b/src/libstd/clone.rs index 2965b31a8c3..f74d9abda8b 100644 --- a/src/libstd/clone.rs +++ b/src/libstd/clone.rs @@ -24,6 +24,7 @@ by convention implementing the `Clone` trait and calling the use core::kinds::Const; +/// A common trait for cloning an object. pub trait Clone { /// Returns a copy of the value. The contents of owned pointers /// are copied to maintain uniqueness, while the contents of @@ -85,6 +86,8 @@ clone_impl!(()) clone_impl!(bool) clone_impl!(char) +/// A trait distinct from `Clone` which represents "deep copies" of things like +/// managed boxes which would otherwise not be copied. pub trait DeepClone { /// Return a deep copy of the value. Unlike `Clone`, the contents of shared pointer types /// *are* copied. Note that this is currently unimplemented for managed boxes, as -- cgit 1.4.1-3-g733a5