about summary refs log tree commit diff
path: root/src/libsyntax/ast_map
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-04-01 18:37:54 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-01 18:37:54 -0700
commitf92e7abefd0231f80d16062e5ff6aaf8cc3bc861 (patch)
treee8c5150252807a3b65c231c338627aaaef025f92 /src/libsyntax/ast_map
parent05654e528d9835f5b994241970bb4b6162665750 (diff)
parent449643301c1b30adf6b338174351219a58ffdb36 (diff)
downloadrust-f92e7abefd0231f80d16062e5ff6aaf8cc3bc861.tar.gz
rust-f92e7abefd0231f80d16062e5ff6aaf8cc3bc861.zip
rollup merge of #23860: nikomatsakis/copy-requires-clone
Conflicts:
	src/test/compile-fail/coherence-impls-copy.rs
Diffstat (limited to 'src/libsyntax/ast_map')
-rw-r--r--src/libsyntax/ast_map/blocks.rs4
-rw-r--r--src/libsyntax/ast_map/mod.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/ast_map/blocks.rs b/src/libsyntax/ast_map/blocks.rs
index 1994ca70bbb..475970ac30a 100644
--- a/src/libsyntax/ast_map/blocks.rs
+++ b/src/libsyntax/ast_map/blocks.rs
@@ -40,7 +40,7 @@ use visit;
 ///   - The default implementation for a trait method.
 ///
 /// To construct one, use the `Code::from_node` function.
-#[derive(Copy)]
+#[derive(Copy, Clone)]
 pub struct FnLikeNode<'a> { node: ast_map::Node<'a> }
 
 /// MaybeFnLike wraps a method that indicates if an object
@@ -80,7 +80,7 @@ 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).
-#[derive(Copy)]
+#[derive(Copy, Clone)]
 pub enum Code<'a> {
     FnLikeCode(FnLikeNode<'a>),
     BlockCode(&'a Block),
diff --git a/src/libsyntax/ast_map/mod.rs b/src/libsyntax/ast_map/mod.rs
index 2b5cb7076f4..2a9a609ecd1 100644
--- a/src/libsyntax/ast_map/mod.rs
+++ b/src/libsyntax/ast_map/mod.rs
@@ -101,7 +101,7 @@ pub fn path_to_string<PI: Iterator<Item=PathElem>>(path: PI) -> String {
     })
 }
 
-#[derive(Copy, Debug)]
+#[derive(Copy, Clone, Debug)]
 pub enum Node<'ast> {
     NodeItem(&'ast Item),
     NodeForeignItem(&'ast ForeignItem),