diff --git a/src/librustdoc/html/render/span_map.rs b/src/librustdoc/html/render/span_map.rs
index bc9417b1bb1d..257f5da877b5 100644
--- a/src/librustdoc/html/render/span_map.rs
+++ b/src/librustdoc/html/render/span_map.rs
@@ -7,7 +7,6 @@ use rustc_hir::intravisit::{self, Visitor, VisitorExt};
use rustc_hir::{ExprKind, HirId, Item, ItemKind, Mod, Node, QPath};
use rustc_middle::hir::nested_filter;
use rustc_middle::ty::TyCtxt;
-use rustc_span::hygiene::MacroKind;
use rustc_span::{BytePos, ExpnKind};
use crate::clean::{self, PrimitiveType, rustc_span};
@@ -194,7 +193,7 @@ impl SpanMapVisitor<'_> {
}
let macro_name = match data.kind {
- ExpnKind::Macro(MacroKind::Bang, macro_name) => macro_name,
+ ExpnKind::Macro(_, macro_name) => macro_name,
// Even though we don't handle this kind of macro, this `data` still comes from
// expansion so we return `true` so we don't go any deeper in this code.
_ => return true,
diff --git a/tests/rustdoc/jump-to-def-assoc-items.rs b/tests/rustdoc/jump-to-def-assoc-items.rs
index 8cbf99062838..0dfe3c7bdc15 100644
--- a/tests/rustdoc/jump-to-def-assoc-items.rs
+++ b/tests/rustdoc/jump-to-def-assoc-items.rs
@@ -26,6 +26,9 @@ impl C {
pub fn wat() {}
}
+//@ has - '//a[@href="{{channel}}/core/fmt/macros/macro.Debug.html"]' 'Debug'
+//@ has - '//a[@href="{{channel}}/core/cmp/macro.PartialEq.html"]' 'PartialEq'
+#[derive(Debug, PartialEq)]
pub struct Bar;
impl Trait for Bar {
type T = Foo;