diff --git a/src/librustc/middle/borrowck/mod.rs b/src/librustc/middle/borrowck/mod.rs index 96d0d0eaa2ff034b675c2cc0e717e0452584ca32..98258e42e8bd0081ca58197bf390262b313b7a7f 100644 --- a/src/librustc/middle/borrowck/mod.rs +++ b/src/librustc/middle/borrowck/mod.rs @@ -49,16 +49,9 @@ 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 2ae07e9a48034f316253a470bfe4f3a5d018c715..068f8442c5184500493888f245592243cfebc940 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 {