File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
branches/snap-stage3/src/comp/syntax Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 93e9600a94ab516b090a8e90233ec0694a9b3b23
4
+ refs/heads/snap-stage3: 1625a4320d80d65814dbbef2a593ba340163bc9c
5
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -34,17 +34,15 @@ type lookup_fn = fn@(file_pos) -> uint;
34
34
35
35
fn lookup_pos ( map : codemap , pos : uint , lookup : lookup_fn ) -> loc {
36
36
let len = vec:: len ( map. files ) ;
37
- if len > 1 u && map. files [ len - 1 u] . name == "-" {
38
- // the trailing "-" must be the core_macros inserted by expand_crate,
39
- // exclude it from the targets to lookup
40
- len = len - 1 u;
41
- }
42
37
let a = 0 u;
43
38
let b = len;
44
39
while b - a > 1 u {
45
40
let m = ( a + b) / 2 u;
46
41
if lookup ( map. files [ m] . start_pos ) > pos { b = m; } else { a = m; }
47
42
}
43
+ if ( a >= len) {
44
+ ret { filename : "-" , line : 0 u, col : 0 u } ;
45
+ }
48
46
let f = map. files [ a] ;
49
47
a = 0 u;
50
48
b = vec:: len ( f. lines ) ;
You can’t perform that action at this time.
0 commit comments