about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@mozilla.com>2014-05-12 21:29:31 -0700
committerCameron Zwarich <zwarich@mozilla.com>2014-05-12 21:29:31 -0700
commit45b4ef463377cd4e2ffb5f757120fcc2c6574f1e (patch)
treed2e565edd7307fe3902d8773fe88fd7cad9640bd /src
parente3c62a20c3a41f98361f4d092720227f4946b39e (diff)
downloadrust-45b4ef463377cd4e2ffb5f757120fcc2c6574f1e.tar.gz
rust-45b4ef463377cd4e2ffb5f757120fcc2c6574f1e.zip
Remove a workaround for deriving(Clone) on unit structs.
Diffstat (limited to 'src')
-rw-r--r--src/librustc/middle/borrowck/mod.rs9
-rw-r--r--src/librustc/middle/borrowck/move_data.rs18
2 files changed, 3 insertions, 24 deletions
diff --git a/src/librustc/middle/borrowck/mod.rs b/src/librustc/middle/borrowck/mod.rs
index 96d0d0eaa2f..98258e42e8b 100644
--- a/src/librustc/middle/borrowck/mod.rs
+++ b/src/librustc/middle/borrowck/mod.rs
@@ -49,16 +49,9 @@ pub mod gather_loans;
 
 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> {
diff --git a/src/librustc/middle/borrowck/move_data.rs b/src/librustc/middle/borrowck/move_data.rs
index 2ae07e9a480..068f8442c51 100644
--- a/src/librustc/middle/borrowck/move_data.rs
+++ b/src/librustc/middle/borrowck/move_data.rs
@@ -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 {