Skip to content

Commit 1ac28c3

Browse files
committed
Remove unused types from codemap
1 parent 4a5b28f commit 1ac28c3

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

src/libsyntax/codemap.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -147,28 +147,13 @@ pub struct Loc {
147147
file: @FileMap, line: uint, col: CharPos
148148
}
149149

150-
/// An absolute offset within the CodeMap (not a relative offset within a
151-
/// a single FileMap)
152-
pub struct FilePos {
153-
ch: CharPos, byte: BytePos
154-
}
155-
156-
impl FilePos : cmp::Eq {
157-
pure fn eq(other: &FilePos) -> bool {
158-
self.ch == (*other).ch && self.byte == (*other).byte
159-
}
160-
pure fn ne(other: &FilePos) -> bool { !self.eq(other) }
161-
}
162-
163150
pub enum ExpnInfo {
164151
ExpandedFrom({call_site: span,
165152
callie: {name: ~str, span: Option<span>}})
166153
}
167154

168155
pub type FileName = ~str;
169156

170-
pub type LookupFn = pure fn(FilePos) -> uint;
171-
172157
pub struct FileLines {
173158
file: @FileMap,
174159
lines: ~[uint]

src/libsyntax/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use util::interner;
2020
use diagnostic::{span_handler, mk_span_handler, mk_handler, emitter};
2121
use lexer::{reader, string_reader};
2222
use parse::token::{ident_interner, mk_ident_interner};
23-
use codemap::{CodeMap, FileMap, CharPos, BytePos, FilePos};
23+
use codemap::{CodeMap, FileMap, CharPos, BytePos};
2424

2525
type parse_sess = @{
2626
cm: @codemap::CodeMap,

src/libsyntax/parse/lexer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use diagnostic::span_handler;
2-
use codemap::{span, CodeMap, CharPos, BytePos, FilePos};
2+
use codemap::{span, CodeMap, CharPos, BytePos};
33
use ext::tt::transcribe::{tt_reader, new_tt_reader, dup_tt_reader,
44
tt_next_token};
55

0 commit comments

Comments
 (0)