about summary refs log tree commit diff
path: root/src/libextra
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-01-27 20:26:35 -0800
committerbors <bors@rust-lang.org>2014-01-27 20:26:35 -0800
commitd21b18306cd3679e94c58d9d5c1c4a3d291167fe (patch)
treec0bc8549bbd8d6b5b2ef4718ed793f8693f01e4a /src/libextra
parent8c6c229831a0859d7345b16b46473002073b646d (diff)
parentcb02a370428afaae76db59080befe88b8c97e14d (diff)
auto merge of #11826 : huonw/rust/7621-deriving-errors, r=alexcrichton
cc #7621.

See the commit message. I'm not sure if we should merge this now, or wait until we can write `Clone::clone(x)` which will directly solve the above issue with perfect error messages.
Diffstat (limited to 'src/libextra')
-rw-r--r--src/libextra/dlist.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libextra/dlist.rs b/src/libextra/dlist.rs
index 32079788942..4023a4d7e7f 100644
--- a/src/libextra/dlist.rs
+++ b/src/libextra/dlist.rs
@@ -47,13 +47,17 @@ struct Node<T> {
 }
 
 /// Double-ended DList iterator
-#[deriving(Clone)]
 pub struct Items<'a, T> {
     priv head: &'a Link<T>,
     priv tail: Rawlink<Node<T>>,
     priv nelem: uint,
 }
 
+// FIXME #11820: the &'a Option<> of the Link stops clone working.
+impl<'a, T> Clone for Items<'a, T> {
+    fn clone(&self) -> Items<'a, T> { *self }
+}
+
 /// Double-ended mutable DList iterator
 pub struct MutItems<'a, T> {
     priv list: &'a mut DList<T>,