File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -262,10 +262,9 @@ impl SourceMap {
262
262
263
263
fn register_source_file (
264
264
& self ,
265
+ file_id : StableSourceFileId ,
265
266
mut file : SourceFile ,
266
267
) -> Result < Lrc < SourceFile > , OffsetOverflowError > {
267
- let file_id = StableSourceFileId :: new ( & file) ;
268
-
269
268
let mut files = self . files . borrow_mut ( ) ;
270
269
271
270
file. start_pos = BytePos ( if let Some ( last_file) = files. source_files . last ( ) {
@@ -313,7 +312,7 @@ impl SourceMap {
313
312
// the ID we generate for the SourceFile we just created.
314
313
debug_assert_eq ! ( StableSourceFileId :: new( & source_file) , file_id) ;
315
314
316
- self . register_source_file ( source_file)
315
+ self . register_source_file ( file_id , source_file)
317
316
}
318
317
}
319
318
}
@@ -355,7 +354,8 @@ impl SourceMap {
355
354
cnum,
356
355
} ;
357
356
358
- self . register_source_file ( source_file)
357
+ let file_id = StableSourceFileId :: new ( & source_file) ;
358
+ self . register_source_file ( file_id, source_file)
359
359
. expect ( "not enough address space for imported source file" )
360
360
}
361
361
You can’t perform that action at this time.
0 commit comments