File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ pub struct FileMap {
242
242
/// The start position of this source in the CodeMap
243
243
start_pos: BytePos ,
244
244
/// Locations of lines beginnings in the source code
245
- mut lines: ~[ BytePos ] ,
245
+ lines: @ mut ~[ BytePos ] ,
246
246
/// Locations of multi-byte characters in the source code
247
247
multibyte_chars: DVec <MultiByteChar >
248
248
}
@@ -312,7 +312,7 @@ pub impl CodeMap {
312
312
let filemap = @FileMap {
313
313
name: filename, substr: substr, src: src,
314
314
start_pos: BytePos ( start_pos) ,
315
- mut lines: ~[ ] ,
315
+ lines: @ mut ~[ ] ,
316
316
multibyte_chars: DVec ( )
317
317
} ;
318
318
@@ -439,7 +439,7 @@ priv impl CodeMap {
439
439
let idx = self . lookup_filemap_idx ( pos) ;
440
440
let f = self . files [ idx] ;
441
441
let mut a = 0 u;
442
- let mut b = vec :: len ( f. lines ) ;
442
+ let mut b = f. lines . len ( ) ;
443
443
while b - a > 1 u {
444
444
let m = ( a + b) / 2 u;
445
445
if f. lines [ m] > pos { b = m; } else { a = m; }
Original file line number Diff line number Diff line change @@ -18,15 +18,15 @@ use hashmap::linear::LinearMap;
18
18
use dvec:: DVec ;
19
19
20
20
pub struct Interner < T > {
21
- priv mut map: LinearMap < T , uint > ,
21
+ priv map: @ mut LinearMap < T , uint > ,
22
22
priv vect : DVec < T > ,
23
23
}
24
24
25
25
// when traits can extend traits, we should extend index<uint,T> to get []
26
26
pub impl < T : Eq + IterBytes + Hash + Const + Copy > Interner < T > {
27
27
static fn new( ) -> Interner <T > {
28
28
Interner {
29
- map: LinearMap :: new( ) ,
29
+ map: @ mut LinearMap :: new( ) ,
30
30
vect: DVec ( ) ,
31
31
}
32
32
}
You can’t perform that action at this time.
0 commit comments