diff options
Diffstat (limited to 'src/libsyntax/ast_map/blocks.rs')
| -rw-r--r-- | src/libsyntax/ast_map/blocks.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libsyntax/ast_map/blocks.rs b/src/libsyntax/ast_map/blocks.rs index 6decfd1c3ad..7c89245f53e 100644 --- a/src/libsyntax/ast_map/blocks.rs +++ b/src/libsyntax/ast_map/blocks.rs @@ -41,10 +41,9 @@ use visit; /// - The default implementation for a trait method. /// /// To construct one, use the `Code::from_node` function. +#[deriving(Copy)] pub struct FnLikeNode<'a> { node: ast_map::Node<'a> } -impl<'a> Copy for FnLikeNode<'a> {} - /// MaybeFnLike wraps a method that indicates if an object /// corresponds to some FnLikeNode. pub trait MaybeFnLike { fn is_fn_like(&self) -> bool; } @@ -82,13 +81,12 @@ impl MaybeFnLike for ast::Expr { /// Carries either an FnLikeNode or a Block, as these are the two /// constructs that correspond to "code" (as in, something from which /// we can construct a control-flow graph). +#[deriving(Copy)] pub enum Code<'a> { FnLikeCode(FnLikeNode<'a>), BlockCode(&'a Block), } -impl<'a> Copy for Code<'a> {} - impl<'a> Code<'a> { pub fn id(&self) -> ast::NodeId { match *self { |
