Skip to content

Commit aae871d

Browse files
authored
Rollup merge of rust-lang#84492 - jyn514:span, r=camelid
rustdoc: Remove unnecessary dummy span Follow-up to rust-lang#84460 (comment). r? `@camelid`
2 parents ed991a3 + 7c50b82 commit aae871d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librustdoc/visit_ast.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
7171
}
7272

7373
crate fn visit(mut self, krate: &'tcx hir::Crate<'_>) -> Module<'tcx> {
74+
let span = krate.item.inner;
7475
let mut top_level_module = self.visit_mod_contents(
75-
krate.item.inner,
76-
&Spanned { span: rustc_span::DUMMY_SP, node: hir::VisibilityKind::Public },
76+
span,
77+
&Spanned { span, node: hir::VisibilityKind::Public },
7778
hir::CRATE_HIR_ID,
7879
&krate.item,
7980
self.cx.tcx.crate_name,
@@ -130,7 +131,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
130131
fn visit_mod_contents(
131132
&mut self,
132133
span: Span,
133-
vis: &'tcx hir::Visibility<'_>,
134+
vis: &hir::Visibility<'_>,
134135
id: hir::HirId,
135136
m: &'tcx hir::Mod<'tcx>,
136137
name: Symbol,

0 commit comments

Comments
 (0)