Skip to content

Commit

Permalink
rustdoc: Remove unnecessary dummy span
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Apr 23, 2021
1 parent 484c619 commit 7c50b82
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/librustdoc/visit_ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
}

crate fn visit(mut self, krate: &'tcx hir::Crate<'_>) -> Module<'tcx> {
let span = krate.item.inner;
let mut top_level_module = self.visit_mod_contents(
krate.item.inner,
&Spanned { span: rustc_span::DUMMY_SP, node: hir::VisibilityKind::Public },
span,
&Spanned { span, node: hir::VisibilityKind::Public },
hir::CRATE_HIR_ID,
&krate.item,
self.cx.tcx.crate_name,
Expand Down Expand Up @@ -130,7 +131,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
fn visit_mod_contents(
&mut self,
span: Span,
vis: &'tcx hir::Visibility<'_>,
vis: &hir::Visibility<'_>,
id: hir::HirId,
m: &'tcx hir::Mod<'tcx>,
name: Symbol,
Expand Down

0 comments on commit 7c50b82

Please sign in to comment.