@@ -144,7 +144,7 @@ impl FilenameIndex {
144144 // rustc seems to store relative paths to files in the workspace, so if filename is absolute,
145145 // we can compare them using Path::ends_with
146146 FileName :: Real ( real_file_name) => {
147- let other = real_file_name. path ( RemapPathScopeComponents :: empty ( ) ) . to_path_buf ( ) ;
147+ let other = real_file_name. path ( RemapPathScopeComponents :: DOCUMENTATION ) . to_path_buf ( ) ;
148148 let canonical = other. canonicalize ( ) ;
149149 let other = canonical. as_ref ( ) . unwrap_or ( & other) ;
150150 filename. ends_with ( other)
@@ -159,7 +159,7 @@ impl FilenameIndex {
159159 . iter( )
160160 . filter_map( |file| match & file. name {
161161 FileName :: Real ( other) =>
162- Some ( other. path( RemapPathScopeComponents :: empty ( ) ) . display( ) . to_string( ) ) ,
162+ Some ( other. path( RemapPathScopeComponents :: DOCUMENTATION ) . display( ) . to_string( ) ) ,
163163 _ => None ,
164164 } )
165165 . collect:: <Vec <_>>( )
@@ -273,7 +273,7 @@ impl ByteRange {
273273 let file = source_map. lookup_source_file ( span. lo ( ) ) ;
274274 let filename = match & file. name {
275275 FileName :: Real ( real_file_name) => {
276- let filename = real_file_name. path ( RemapPathScopeComponents :: empty ( ) ) ;
276+ let filename = real_file_name. path ( RemapPathScopeComponents :: DOCUMENTATION ) ;
277277 Filename ( filename. to_path_buf ( ) ) . intern_with_ctx ( & mut ctx)
278278 }
279279 filename => bail ! ( "Range::from_span doesn't support {filename:?}" ) ,
0 commit comments