@@ -320,7 +320,7 @@ impl SourceMap {
320320 // Note that filename may not be a valid path, eg it may be `<anon>` etc,
321321 // but this is okay because the directory determined by `path.pop()` will
322322 // be empty, so the working directory will be used.
323- let ( filename, _ ) = self . path_mapping . map_filename_prefix ( & filename) ;
323+ let filename = self . path_mapping . map_filename_prefix ( & filename) ;
324324
325325 let file_id = StableSourceFileId :: new_from_name ( & filename, LOCAL_CRATE ) ;
326326 match self . source_file_by_stable_id ( file_id) {
@@ -995,7 +995,7 @@ impl SourceMap {
995995
996996 pub fn get_source_file ( & self , filename : & FileName ) -> Option < Lrc < SourceFile > > {
997997 // Remap filename before lookup
998- let filename = self . path_mapping ( ) . map_filename_prefix ( filename) . 0 ;
998+ let filename = self . path_mapping ( ) . map_filename_prefix ( filename) ;
999999 for sf in self . files . borrow ( ) . source_files . iter ( ) {
10001000 if filename == sf. name {
10011001 return Some ( sf. clone ( ) ) ;
@@ -1150,7 +1150,7 @@ impl FilePathMapping {
11501150 /// Given a `file`, map it using the `remap-path-prefix` options for the current [`Session`].
11511151 ///
11521152 /// Public for use in rustc_metadata::decoder
1153- pub fn map_filename_prefix ( & self , file : & FileName ) -> ( FileName , bool ) {
1153+ pub fn map_filename_prefix ( & self , file : & FileName ) -> FileName {
11541154 match file {
11551155 FileName :: Real ( realfile @ RealFileName :: LocalPath ( local_path) ) => {
11561156 let ( mapped_path, mapped) = self . map_prefix ( local_path) ;
@@ -1162,16 +1162,16 @@ impl FilePathMapping {
11621162 } else {
11631163 realfile. clone ( )
11641164 } ;
1165- ( FileName :: Real ( realfile) , mapped )
1165+ FileName :: Real ( realfile)
11661166 }
11671167 existing @ FileName :: Real ( RealFileName :: Remapped { .. } ) => {
11681168 // This can happen if we are remapping the name of file that was loaded in a
11691169 // different Session, and inconsistent `remap-path-prefix` flags were passed between
11701170 // sessions. It's unclear what to do here. For now, respect the original flag, not
11711171 // the flag from the current session.
1172- ( existing. clone ( ) , false )
1172+ existing. clone ( )
11731173 }
1174- other => ( other. clone ( ) , false ) ,
1174+ other => other. clone ( ) ,
11751175 }
11761176 }
11771177
0 commit comments