Skip to content

Commit 04c23d3

Browse files
committed
auto merge of #14168 : zwarich/rust/deriving-clone, r=alexcrichton
2 parents 463436f + 45b4ef4 commit 04c23d3

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

src/librustc/middle/borrowck/mod.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,9 @@ pub mod gather_loans;
4949

5050
pub mod move_data;
5151

52+
#[deriving(Clone)]
5253
pub struct LoanDataFlowOperator;
5354

54-
/// FIXME(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
55-
/// yet on unit structs.
56-
impl Clone for LoanDataFlowOperator {
57-
fn clone(&self) -> LoanDataFlowOperator {
58-
LoanDataFlowOperator
59-
}
60-
}
61-
6255
pub type LoanDataFlow<'a> = DataFlowContext<'a, LoanDataFlowOperator>;
6356

6457
impl<'a> Visitor<()> for BorrowckCtxt<'a> {

src/librustc/middle/borrowck/move_data.rs

+2-16
Original file line numberDiff line numberDiff line change
@@ -147,28 +147,14 @@ pub struct Assignment {
147147
pub span: Span,
148148
}
149149

150+
#[deriving(Clone)]
150151
pub struct MoveDataFlowOperator;
151152

152-
/// FIXME(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
153-
/// yet on unit structs.
154-
impl Clone for MoveDataFlowOperator {
155-
fn clone(&self) -> MoveDataFlowOperator {
156-
MoveDataFlowOperator
157-
}
158-
}
159-
160153
pub type MoveDataFlow<'a> = DataFlowContext<'a, MoveDataFlowOperator>;
161154

155+
#[deriving(Clone)]
162156
pub struct AssignDataFlowOperator;
163157

164-
/// FIXME(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
165-
/// yet on unit structs.
166-
impl Clone for AssignDataFlowOperator {
167-
fn clone(&self) -> AssignDataFlowOperator {
168-
AssignDataFlowOperator
169-
}
170-
}
171-
172158
pub type AssignDataFlow<'a> = DataFlowContext<'a, AssignDataFlowOperator>;
173159

174160
impl MoveData {

0 commit comments

Comments
 (0)