@@ -306,8 +306,8 @@ impl Span {
306
306
307
307
/// The original source file into which this span points.
308
308
#[ unstable( feature = "proc_macro_span" , issue = "38356" ) ]
309
- pub fn source_file ( & self ) -> SourceFile {
310
- SourceFile {
309
+ pub fn original_source_file ( & self ) -> OriginalSourceFile {
310
+ OriginalSourceFile {
311
311
filemap : __internal:: lookup_char_pos ( self . 0 . lo ( ) ) . file ,
312
312
}
313
313
}
@@ -418,20 +418,20 @@ impl !Sync for LineColumn {}
418
418
/// The source file of a given `Span`.
419
419
#[ unstable( feature = "proc_macro_span" , issue = "38356" ) ]
420
420
#[ derive( Clone ) ]
421
- pub struct SourceFile {
421
+ pub struct OriginalSourceFile {
422
422
filemap : Lrc < FileMap > ,
423
423
}
424
424
425
425
#[ unstable( feature = "proc_macro_span" , issue = "38356" ) ]
426
- impl !Send for SourceFile { }
426
+ impl !Send for OriginalSourceFile { }
427
427
#[ unstable( feature = "proc_macro_span" , issue = "38356" ) ]
428
- impl !Sync for SourceFile { }
428
+ impl !Sync for OriginalSourceFile { }
429
429
430
- impl SourceFile {
430
+ impl OriginalSourceFile {
431
431
/// Get the path to this source file.
432
432
///
433
433
/// ### Note
434
- /// If the code span associated with this `SourceFile ` was generated by an external macro, this
434
+ /// If the code span associated with this `OriginalSourceFile ` was generated by an external macro, this
435
435
/// may not be an actual path on the filesystem. Use [`is_real`] to check.
436
436
///
437
437
/// Also note that even if `is_real` returns `true`, if `--remap-path-prefix` was passed on
@@ -459,24 +459,24 @@ impl SourceFile {
459
459
460
460
461
461
#[ unstable( feature = "proc_macro_span" , issue = "38356" ) ]
462
- impl fmt:: Debug for SourceFile {
462
+ impl fmt:: Debug for OriginalSourceFile {
463
463
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
464
- f. debug_struct ( "SourceFile " )
464
+ f. debug_struct ( "OriginalSourceFile " )
465
465
. field ( "path" , & self . path ( ) )
466
466
. field ( "is_real" , & self . is_real ( ) )
467
467
. finish ( )
468
468
}
469
469
}
470
470
471
471
#[ unstable( feature = "proc_macro_span" , issue = "38356" ) ]
472
- impl PartialEq for SourceFile {
472
+ impl PartialEq for OriginalSourceFile {
473
473
fn eq ( & self , other : & Self ) -> bool {
474
474
Lrc :: ptr_eq ( & self . filemap , & other. filemap )
475
475
}
476
476
}
477
477
478
478
#[ unstable( feature = "proc_macro_span" , issue = "38356" ) ]
479
- impl Eq for SourceFile { }
479
+ impl Eq for OriginalSourceFile { }
480
480
481
481
/// A single token or a delimited sequence of token trees (e.g. `[1, (), ..]`).
482
482
#[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
0 commit comments