rustdoc: Finalize dyn compatibility renaming

This commit is contained in:
León Orell Valerian Liehr 2025-01-22 05:03:54 +01:00
parent a24bdc60ce
commit ff7cf142c0
No known key found for this signature in database
GPG key ID: D17A07215F68E713
2 changed files with 2 additions and 3 deletions

View file

@ -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

View file

@ -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);
}