diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index 5d6909f0bb97f..556d383a0e9fb 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -2343,9 +2343,10 @@ fn render_impl_summary(
if let Some(doc) = doc {
if impl_is_empty {
w.write_str(
- "
\
-
This impl block contains no items.
\
-
",
+ "\
+\
+
This impl block contains no public items.
\
+
",
)?;
}
write!(w, "{doc}
")?;
diff --git a/tests/rustdoc-html/impl/empty-impl-block.rs b/tests/rustdoc-html/impl/empty-impl-block.rs
index 91fd4a64ef939..7ca5813aae2ef 100644
--- a/tests/rustdoc-html/impl/empty-impl-block.rs
+++ b/tests/rustdoc-html/impl/empty-impl-block.rs
@@ -4,7 +4,7 @@
pub struct Foo;
//@ has - '//*[@class="docblock"]' 'Hello empty impl block!'
-//@ has - '//*[@class="item-info"]' 'This impl block contains no items.'
+//@ has - '//*[@class="item-info"]' 'This impl block contains no public items.'
/// Hello empty impl block!
impl Foo {}
// We ensure that this empty impl block without doc isn't rendered.