@@ -623,36 +623,19 @@ impl SourceFile {
623623 /// Gets the path to this source file.
624624 ///
625625 /// ### Note
626- /// If the code span associated with this `SourceFile` was generated by an external macro, this
627- /// macro, this might not be an actual path on the filesystem. Use [`is_real`] to check.
628626 ///
629- /// Also note that even if `is_real` returns `true`, if `--remap-path-prefix` was passed on
627+ /// If `--remap-path-prefix` was passed on
630628 /// the command line, the path as given might not actually be valid.
631- ///
632- /// [`is_real`]: Self::is_real
633629 #[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
634630 pub fn path ( & self ) -> PathBuf {
635631 PathBuf :: from ( self . 0 . path ( ) )
636632 }
637-
638- /// Returns `true` if this source file is a real source file, and not generated by an external
639- /// macro's expansion.
640- #[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
641- pub fn is_real ( & self ) -> bool {
642- // This is a hack until intercrate spans are implemented and we can have real source files
643- // for spans generated in external macros.
644- // https://github.com/rust-lang/rust/pull/43604#issuecomment-333334368
645- self . 0 . is_real ( )
646- }
647633}
648634
649635#[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
650636impl fmt:: Debug for SourceFile {
651637 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
652- f. debug_struct ( "SourceFile" )
653- . field ( "path" , & self . path ( ) )
654- . field ( "is_real" , & self . is_real ( ) )
655- . finish ( )
638+ f. debug_struct ( "SourceFile" ) . field ( "path" , & self . path ( ) ) . finish ( )
656639 }
657640}
658641
0 commit comments