mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 04:56:25 +03:00
Remove a workaround for deriving(Clone) on unit structs.
This commit is contained in:
@@ -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> {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user