Skip to content

Commit

Permalink
Rollup merge of rust-lang#84492 - jyn514:span, r=camelid
Browse files Browse the repository at this point in the history
rustdoc: Remove unnecessary dummy span

Follow-up to rust-lang#84460 (comment).

r? `@camelid`
  • Loading branch information
JohnTitor committed Apr 24, 2021
2 parents ed991a3 + 7c50b82 commit aae871d
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 aae871d

Please sign in to comment.