diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-10-07 07:28:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-07 07:28:10 +0200 |
| commit | a636398897688c341066a764e85114dbb9fe8fc2 (patch) | |
| tree | f31fad35cdfc5a890f4df5c3356f877b2b99cf63 | |
| parent | 047ff20875171597f61437c739cdc4f1aa825738 (diff) | |
| parent | 0997b28a8917d46875cfd6622f794d28dc346140 (diff) | |
| download | rust-a636398897688c341066a764e85114dbb9fe8fc2.tar.gz rust-a636398897688c341066a764e85114dbb9fe8fc2.zip | |
Rollup merge of #102744 - notriddle:notriddle/content-item-list, r=GuillaumeGomez
rustdoc: remove unused CSS `.content .item-list` When these rules were added in 4fd061c426902b0904c65e64a3780b21f9ab3afb (yeah, that's the very first commit of rustdoc_ng), `.item-list` was a `<ul>`, and this would override the default style for that tag. In c1b1d6804bfce1aee3a95b3cbff3eaeb15bad9a4, it was changed to use a `<div>` tag, so these rules are both no-ops.
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 8 | ||||
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 5 | ||||
| -rw-r--r-- | src/test/rustdoc/impl-disambiguation.rs | 10 | ||||
| -rw-r--r-- | src/test/rustdoc/impl-parts.rs | 2 |
4 files changed, 10 insertions, 15 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 7bd0dbf9325..7999373511b 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -890,7 +890,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean: w, "implementors", "Implementors", - "<div class=\"item-list\" id=\"implementors-list\">", + "<div id=\"implementors-list\">", ); for implementor in concrete { render_implementor(cx, implementor, it, w, &implementor_dups, &[]); @@ -902,7 +902,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean: w, "synthetic-implementors", "Auto implementors", - "<div class=\"item-list\" id=\"synthetic-implementors-list\">", + "<div id=\"synthetic-implementors-list\">", ); for implementor in synthetic { render_implementor( @@ -923,7 +923,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean: w, "implementors", "Implementors", - "<div class=\"item-list\" id=\"implementors-list\"></div>", + "<div id=\"implementors-list\"></div>", ); if t.is_auto(cx.tcx()) { @@ -931,7 +931,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean: w, "synthetic-implementors", "Auto implementors", - "<div class=\"item-list\" id=\"synthetic-implementors-list\"></div>", + "<div id=\"synthetic-implementors-list\"></div>", ); } } diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 28e968c9ff5..062db43ed8d 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -690,11 +690,6 @@ pre, .rustdoc.source .example-wrap { border: 1px solid var(--border-color); } -.content .item-list { - list-style-type: none; - padding: 0; -} - /* Shift "where ..." part of method or fn definition down a line */ .content .method .where, .content .fn .where, diff --git a/src/test/rustdoc/impl-disambiguation.rs b/src/test/rustdoc/impl-disambiguation.rs index bb978dc0f3e..9e74ede8ff7 100644 --- a/src/test/rustdoc/impl-disambiguation.rs +++ b/src/test/rustdoc/impl-disambiguation.rs @@ -4,13 +4,13 @@ pub trait Foo {} pub struct Bar<T> { field: T } -// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header"]' \ +// @has foo/trait.Foo.html '//*[@id="implementors-list"]//h3[@class="code-header"]' \ // "impl Foo for Bar<u8>" impl Foo for Bar<u8> {} -// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header"]' \ +// @has foo/trait.Foo.html '//*[@id="implementors-list"]//h3[@class="code-header"]' \ // "impl Foo for Bar<u16>" impl Foo for Bar<u16> {} -// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header"]' \ +// @has foo/trait.Foo.html '//*[@id="implementors-list"]//h3[@class="code-header"]' \ // "impl<'a> Foo for &'a Bar<u8>" impl<'a> Foo for &'a Bar<u8> {} @@ -22,9 +22,9 @@ pub mod mod2 { pub enum Baz {} } -// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header"]' \ +// @has foo/trait.Foo.html '//*[@id="implementors-list"]//h3[@class="code-header"]' \ // "impl Foo for foo::mod1::Baz" impl Foo for mod1::Baz {} -// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header"]' \ +// @has foo/trait.Foo.html '//*[@id="implementors-list"]//h3[@class="code-header"]' \ // "impl<'a> Foo for &'a foo::mod2::Baz" impl<'a> Foo for &'a mod2::Baz {} diff --git a/src/test/rustdoc/impl-parts.rs b/src/test/rustdoc/impl-parts.rs index 0a8c2c8d2a9..7b931727e44 100644 --- a/src/test/rustdoc/impl-parts.rs +++ b/src/test/rustdoc/impl-parts.rs @@ -7,6 +7,6 @@ pub struct Foo<T> { field: T } // @has impl_parts/struct.Foo.html '//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ // "impl<T: Clone> !AnAutoTrait for Foo<T>where T: Sync," -// @has impl_parts/trait.AnAutoTrait.html '//*[@class="item-list"]//h3[@class="code-header"]' \ +// @has impl_parts/trait.AnAutoTrait.html '//*[@id="implementors-list"]//h3[@class="code-header"]' \ // "impl<T: Clone> !AnAutoTrait for Foo<T>where T: Sync," impl<T: Clone> !AnAutoTrait for Foo<T> where T: Sync {} |
