diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-07-02 12:47:32 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-07-17 14:57:51 -0700 |
| commit | 99b33f721954bc5290f9201c8f64003c294d0571 (patch) | |
| tree | 786c9bf75d54512d0a80f6975ad40516ab432c3a /src/libsyntax/codemap.rs | |
| parent | b4e674f6e662bc80f2e7a5a1a9834f2152f08d32 (diff) | |
| download | rust-99b33f721954bc5290f9201c8f64003c294d0571.tar.gz rust-99b33f721954bc5290f9201c8f64003c294d0571.zip | |
librustc: Remove all uses of "copy".
Diffstat (limited to 'src/libsyntax/codemap.rs')
| -rw-r--r-- | src/libsyntax/codemap.rs | 11 |
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 { |
