]> git.lizzy.rs Git - rust.git/commitdiff
Remove a workaround for deriving(Clone) on unit structs.
authorCameron Zwarich <zwarich@mozilla.com>
Tue, 13 May 2014 04:29:31 +0000 (21:29 -0700)
committerCameron Zwarich <zwarich@mozilla.com>
Tue, 13 May 2014 04:29:31 +0000 (21:29 -0700)
src/librustc/middle/borrowck/mod.rs
src/librustc/middle/borrowck/move_data.rs

index 96d0d0eaa2ff034b675c2cc0e717e0452584ca32..98258e42e8bd0081ca58197bf390262b313b7a7f 100644 (file)
@@ -49,16 +49,9 @@ macro_rules! if_ok(
 
 pub mod move_data;
 
+#[deriving(Clone)]
 pub struct LoanDataFlowOperator;
 
-/// FIXME(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
-/// yet on unit structs.
-impl Clone for LoanDataFlowOperator {
-    fn clone(&self) -> LoanDataFlowOperator {
-        LoanDataFlowOperator
-    }
-}
-
 pub type LoanDataFlow<'a> = DataFlowContext<'a, LoanDataFlowOperator>;
 
 impl<'a> Visitor<()> for BorrowckCtxt<'a> {
index 2ae07e9a48034f316253a470bfe4f3a5d018c715..068f8442c5184500493888f245592243cfebc940 100644 (file)
@@ -147,28 +147,14 @@ pub struct Assignment {
     pub span: Span,
 }
 
+#[deriving(Clone)]
 pub struct MoveDataFlowOperator;
 
-/// FIXME(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
-/// yet on unit structs.
-impl Clone for MoveDataFlowOperator {
-    fn clone(&self) -> MoveDataFlowOperator {
-        MoveDataFlowOperator
-    }
-}
-
 pub type MoveDataFlow<'a> = DataFlowContext<'a, MoveDataFlowOperator>;
 
+#[deriving(Clone)]
 pub struct AssignDataFlowOperator;
 
-/// FIXME(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
-/// yet on unit structs.
-impl Clone for AssignDataFlowOperator {
-    fn clone(&self) -> AssignDataFlowOperator {
-        AssignDataFlowOperator
-    }
-}
-
 pub type AssignDataFlow<'a> = DataFlowContext<'a, AssignDataFlowOperator>;
 
 impl MoveData {