about summary refs log tree commit diff
path: root/src/libsyntax/codemap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/codemap.rs')
-rw-r--r--src/libsyntax/codemap.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index dcd9615ffd0..a9499881cff 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -31,7 +31,7 @@ pub trait Pos {
 }
 
 /// A byte offset
-#[deriving(Eq,IterBytes)]
+#[deriving(Clone, Eq, IterBytes)]
 pub struct BytePos(uint);
 /// A character offset. Because of multibyte utf8 characters, a byte offset
 /// is not equivalent to a character offset. The CodeMap will convert BytePos
@@ -96,15 +96,18 @@ are *absolute* positions from the beginning of the codemap, not positions
 relative to FileMaps. Methods on the CodeMap can be used to relate spans back
 to the original source.
 */
-#[deriving(IterBytes)]
+#[deriving(Clone, IterBytes)]
 pub struct span {
     lo: BytePos,
     hi: BytePos,
     expn_info: Option<@ExpnInfo>
 }
 
-#[deriving(Eq, Encodable, Decodable,IterBytes)]
-pub struct spanned<T> { node: T, span: span }
+#[deriving(Clone, Eq, Encodable, Decodable, IterBytes)]
+pub struct spanned<T> {
+    node: T,
+    span: span,
+}
 
 impl cmp::Eq for span {
     fn eq(&self, other: &span) -> bool {