Rollup merge of #101046 - notriddle:notriddle/table-css, r=jsha

rustdoc: remove incorrect CSS selector `.impl-items table td`

Fixes #100994

This selector was added in c7312fbae4. The bug can be seen at <https://doc.rust-lang.org/1.27.0/alloc/slice/trait.SliceIndex.html#foreign-impls>.

This rule was added to help with a `<table>` that was used for displaying the function signature [src] lockup. That lockup was changed in 34bd2b845b to use flexbox instead, leaving this selector unused (at least, for its original purpose).
This commit is contained in:
Yuki Okushi 2022-08-27 13:14:23 +09:00 committed by GitHub
commit 0cad2746be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 1 deletions

View File

@ -777,7 +777,7 @@ pre, .rustdoc.source .example-wrap {
.content .docblock >.impl-items table td {
padding: 0;
}
.content .docblock > .impl-items .table-display, .impl-items table td {
.content .docblock > .impl-items .table-display {
border: none;
}

View File

@ -0,0 +1,4 @@
goto: file://|DOC_PATH|/test_docs/doc_block_table/struct.DocBlockTable.html#method.func
compare-elements-css: (".impl-items .docblock table th", ".top-doc .docblock table th", ["border"])
compare-elements-css: (".impl-items .docblock table td", ".top-doc .docblock table td", ["border"])

View File

@ -293,3 +293,29 @@ pub mod details {
/// </details>
pub struct Details;
}
pub mod doc_block_table {
pub trait DocBlockTableTrait {
fn func();
}
/// Struct doc.
///
/// | header1 | header2 |
/// |--------------------------|--------------------------|
/// | Lorem Ipsum, Lorem Ipsum | Lorem Ipsum, Lorem Ipsum |
pub struct DocBlockTable {}
impl DocBlockTableTrait for DocBlockTable {
/// Trait impl func doc for struct.
///
/// | header1 | header2 |
/// |--------------------------|--------------------------|
/// | Lorem Ipsum, Lorem Ipsum | Lorem Ipsum, Lorem Ipsum |
fn func() {
println!();
}
}
}