diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index e1f79254b2488..cbf528e96db94 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -954,13 +954,13 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
if !t.is_object_safe(cx.tcx()) {
write_section_heading(
w,
- "Object Safety",
+ "Trait-Object Safety",
"object-safety",
None,
&format!(
- "
This trait is
not \
+ "
",
+
dyn Trait
types.
",
base = crate::clean::utils::DOC_RUST_LANG_ORG_CHANNEL
),
);
diff --git a/tests/rustdoc/trait-object-safe.rs b/tests/rustdoc/trait-object-safe.rs
index 8b028ad2e134a..2451f5ba74862 100644
--- a/tests/rustdoc/trait-object-safe.rs
+++ b/tests/rustdoc/trait-object-safe.rs
@@ -1,14 +1,14 @@
#![crate_name = "foo"]
// @has 'foo/trait.Unsafe.html'
-// @has - '//*[@class="object-safety-info"]' 'This trait is not object safe.'
+// @has - '//*[@class="object-safety-info"]' 'This trait is not compatible with dyn Trait types.'
// @has - '//*[@id="object-safety"]' 'Object Safety'
pub trait Unsafe {
fn foo() -> Self;
}
// @has 'foo/trait.Unsafe2.html'
-// @has - '//*[@class="object-safety-info"]' 'This trait is not object safe.'
+// @has - '//*[@class="object-safety-info"]' 'This trait is not compatible with dyn Trait types.'
// @has - '//*[@id="object-safety"]' 'Object Safety'
pub trait Unsafe2 {
fn foo(i: T);