@@ -65,7 +65,8 @@ impl Emitter for SilentOnIgnoredFilesEmitter {
65
65
}
66
66
if let Some ( primary_span) = & db. span . primary_span ( ) {
67
67
let file_name = self . source_map . span_to_filename ( * primary_span) ;
68
- if let rustc_span:: FileName :: Real ( rustc_span:: RealFileName :: Named ( ref path) ) = file_name
68
+ if let rustc_span:: FileName :: Real ( rustc_span:: RealFileName :: LocalPath ( ref path) ) =
69
+ file_name
69
70
{
70
71
if self
71
72
. ignore_path_set
@@ -157,7 +158,7 @@ impl ParseSess {
157
158
self . parse_sess
158
159
. source_map ( )
159
160
. get_source_file ( & rustc_span:: FileName :: Real (
160
- rustc_span:: RealFileName :: Named ( path. to_path_buf ( ) ) ,
161
+ rustc_span:: RealFileName :: LocalPath ( path. to_path_buf ( ) ) ,
161
162
) )
162
163
. is_some ( )
163
164
}
@@ -347,7 +348,7 @@ mod tests {
347
348
let source =
348
349
String :: from ( r#"extern "system" fn jni_symbol!( funcName ) ( ... ) -> {} "# ) ;
349
350
source_map. new_source_file (
350
- SourceMapFileName :: Real ( RealFileName :: Named ( PathBuf :: from ( "foo.rs" ) ) ) ,
351
+ SourceMapFileName :: Real ( RealFileName :: LocalPath ( PathBuf :: from ( "foo.rs" ) ) ) ,
351
352
source,
352
353
) ;
353
354
let mut emitter = build_emitter (
@@ -374,7 +375,7 @@ mod tests {
374
375
let source_map = Lrc :: new ( SourceMap :: new ( FilePathMapping :: empty ( ) ) ) ;
375
376
let source = String :: from ( r#"pub fn bar() { 1x; }"# ) ;
376
377
source_map. new_source_file (
377
- SourceMapFileName :: Real ( RealFileName :: Named ( PathBuf :: from ( "foo.rs" ) ) ) ,
378
+ SourceMapFileName :: Real ( RealFileName :: LocalPath ( PathBuf :: from ( "foo.rs" ) ) ) ,
378
379
source,
379
380
) ;
380
381
let mut emitter = build_emitter (
@@ -400,7 +401,7 @@ mod tests {
400
401
let source_map = Lrc :: new ( SourceMap :: new ( FilePathMapping :: empty ( ) ) ) ;
401
402
let source = String :: from ( r#"pub fn bar() { 1x; }"# ) ;
402
403
source_map. new_source_file (
403
- SourceMapFileName :: Real ( RealFileName :: Named ( PathBuf :: from ( "foo.rs" ) ) ) ,
404
+ SourceMapFileName :: Real ( RealFileName :: LocalPath ( PathBuf :: from ( "foo.rs" ) ) ) ,
404
405
source,
405
406
) ;
406
407
let mut emitter = build_emitter (
@@ -430,15 +431,15 @@ mod tests {
430
431
let fatal_source =
431
432
String :: from ( r#"extern "system" fn jni_symbol!( funcName ) ( ... ) -> {} "# ) ;
432
433
source_map. new_source_file (
433
- SourceMapFileName :: Real ( RealFileName :: Named ( PathBuf :: from ( "bar.rs" ) ) ) ,
434
+ SourceMapFileName :: Real ( RealFileName :: LocalPath ( PathBuf :: from ( "bar.rs" ) ) ) ,
434
435
bar_source,
435
436
) ;
436
437
source_map. new_source_file (
437
- SourceMapFileName :: Real ( RealFileName :: Named ( PathBuf :: from ( "foo.rs" ) ) ) ,
438
+ SourceMapFileName :: Real ( RealFileName :: LocalPath ( PathBuf :: from ( "foo.rs" ) ) ) ,
438
439
foo_source,
439
440
) ;
440
441
source_map. new_source_file (
441
- SourceMapFileName :: Real ( RealFileName :: Named ( PathBuf :: from ( "fatal.rs" ) ) ) ,
442
+ SourceMapFileName :: Real ( RealFileName :: LocalPath ( PathBuf :: from ( "fatal.rs" ) ) ) ,
442
443
fatal_source,
443
444
) ;
444
445
let mut emitter = build_emitter (
0 commit comments