Skip to content

Commit b885c29

Browse files
Rename is_real_and_local function into filename_real_and_local
1 parent 2e1f25b commit b885c29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/html/sources.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct LocalSourcesCollector<'a, 'tcx> {
5050
src_root: &'a Path,
5151
}
5252

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> {
5454
if span.cnum(sess) == LOCAL_CRATE
5555
&& let FileName::Real(file) = span.filename(sess)
5656
{
@@ -66,7 +66,7 @@ impl LocalSourcesCollector<'_, '_> {
6666
let span = item.span(self.tcx);
6767
let Some(span) = span else { return };
6868
// 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()) else {
7070
return;
7171
};
7272
if self.local_sources.contains_key(&*p) {
@@ -132,7 +132,7 @@ impl DocVisitor<'_> for SourceCollector<'_, '_> {
132132
// If we're not rendering sources, there's nothing to do.
133133
// If we're including source files, and we haven't seen this file yet,
134134
// then we need to render it out to the filesystem.
135-
if let Some(filename) = is_real_and_local(span, sess) {
135+
if let Some(filename) = filename_real_and_local(span, sess) {
136136
let span = span.inner();
137137
let pos = sess.source_map().lookup_source_file(span.lo());
138138
let file_span = span.with_lo(pos.start_pos).with_hi(pos.end_position());

0 commit comments

Comments
 (0)