@@ -50,7 +50,7 @@ struct LocalSourcesCollector<'a, 'tcx> {
50
50
src_root : & ' a Path ,
51
51
}
52
52
53
- fn is_real_and_local ( span : clean:: Span , sess : & Session ) -> Option < RealFileName > {
53
+ fn filename_real_and_local ( span : clean:: Span , sess : & Session ) -> Option < RealFileName > {
54
54
if span. cnum ( sess) == LOCAL_CRATE
55
55
&& let FileName :: Real ( file) = span. filename ( sess)
56
56
{
@@ -66,7 +66,8 @@ impl LocalSourcesCollector<'_, '_> {
66
66
let span = item. span ( self . tcx ) ;
67
67
let Some ( span) = span else { return } ;
68
68
// skip all synthetic "files"
69
- let Some ( p) = is_real_and_local ( span, sess) . and_then ( |file| file. into_local_path ( ) ) else {
69
+ let Some ( p) = filename_real_and_local ( span, sess) . and_then ( |file| file. into_local_path ( ) )
70
+ else {
70
71
return ;
71
72
} ;
72
73
if self . local_sources . contains_key ( & * p) {
@@ -132,7 +133,7 @@ impl DocVisitor<'_> for SourceCollector<'_, '_> {
132
133
// If we're not rendering sources, there's nothing to do.
133
134
// If we're including source files, and we haven't seen this file yet,
134
135
// then we need to render it out to the filesystem.
135
- if let Some ( filename) = is_real_and_local ( span, sess) {
136
+ if let Some ( filename) = filename_real_and_local ( span, sess) {
136
137
let span = span. inner ( ) ;
137
138
let pos = sess. source_map ( ) . lookup_source_file ( span. lo ( ) ) ;
138
139
let file_span = span. with_lo ( pos. start_pos ) . with_hi ( pos. end_position ( ) ) ;
0 commit comments