mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
rustdoc: Improve sentence for documented empty impl blocks
This commit is contained in:
@@ -2343,9 +2343,10 @@ fn render_impl_summary(
|
||||
if let Some(doc) = doc {
|
||||
if impl_is_empty {
|
||||
w.write_str(
|
||||
"<div class=\"item-info\">\
|
||||
<div class=\"stab empty-impl\">This impl block contains no items.</div>\
|
||||
</div>",
|
||||
"\
|
||||
<div class=\"item-info\">\
|
||||
<div class=\"stab empty-impl\">This impl block contains no public items.</div>\
|
||||
</div>",
|
||||
)?;
|
||||
}
|
||||
write!(w, "<div class=\"docblock\">{doc}</div>")?;
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user