diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 76a51cc64a88b..01e40f823d953 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -914,7 +914,6 @@ fn item_trait(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Tra
     let mut extern_crates = FxIndexSet::default();
 
     if !t.is_dyn_compatible(cx.tcx()) {
-        // FIXME(dyn_compat_renaming): Update the URL once the Reference is updated.
         write_section_heading(
             w,
             "Dyn Compatibility",
@@ -922,7 +921,7 @@ fn item_trait(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Tra
             None,
             format!(
                 "<div class=\"dyn-compatibility-info\"><p>This trait is <b>not</b> \
-                <a href=\"{base}/reference/items/traits.html#object-safety\">dyn compatible</a>.</p>\
+                <a href=\"{base}/reference/items/traits.html#dyn-compatibility\">dyn compatible</a>.</p>\
                 <p><i>In older versions of Rust, dyn compatibility was called \"object safety\", \
                 so this trait is not object safe.</i></p></div>",
                 base = crate::clean::utils::DOC_RUST_LANG_ORG_CHANNEL
diff --git a/tests/rustdoc/sidebar/sidebar-items.rs b/tests/rustdoc/sidebar/sidebar-items.rs
index 57c2eee91a92a..6e13457796e5e 100644
--- a/tests/rustdoc/sidebar/sidebar-items.rs
+++ b/tests/rustdoc/sidebar/sidebar-items.rs
@@ -26,7 +26,7 @@ pub trait Foo {
 }
 
 //@ has foo/trait.DynCompatible.html
-//@ !has - '//div[@class="sidebar-elems"]//h3/a[@href="#object-safety"]' ''
+//@ !has - '//div[@class="sidebar-elems"]//h3/a[@href="#dyn-compatibility"]' ''
 pub trait DynCompatible {
     fn access(&self);
 }