about summary refs log tree commit diff
path: root/tests/rustdoc/struct-arg-pattern.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-01-17 05:25:22 +0100
committerGitHub <noreply@github.com>2023-01-17 05:25:22 +0100
commitb90f62988d06421a4e5fdd63ca625d47aac130a0 (patch)
treeffec19974b34160234d3cf4141c43c2b2635e439 /tests/rustdoc/struct-arg-pattern.rs
parent6b49435480ea9a6d8bbd7fd2acf7b3aa6607577c (diff)
parent3a3f70c94e280cbd8354874438643d15ca6ef319 (diff)
downloadrust-b90f62988d06421a4e5fdd63ca625d47aac130a0.tar.gz
rust-b90f62988d06421a4e5fdd63ca625d47aac130a0.zip
Rollup merge of #106869 - notriddle:notriddle/item-decl-pre-rust, r=GuillaumeGomez
rustdoc: remove redundant item kind class from `.item-decl > pre`

This class originated in the very first commit of `rustdoc_ng`, and was used to add a color border around the item decl based on its kind.

https://github.com/rust-lang/rust/blob/4fd061c426902b0904c65e64a3780b21f9ab3afb/src/rustdoc_ng/html/static/main.css#L102-L106

The item decl no longer has a border, and there aren't any kind-specific styles in modern rustdoc's rendering of this UI item.

Most of this PR is updating test cases so that they use `item-decl` to find the `<pre>` tag instead of relying on the fact that the class name had `rust {kind}` in it while other `<pre>` tags only had class `rust`.
Diffstat (limited to 'tests/rustdoc/struct-arg-pattern.rs')
-rw-r--r--tests/rustdoc/struct-arg-pattern.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/rustdoc/struct-arg-pattern.rs b/tests/rustdoc/struct-arg-pattern.rs
index 3c0369e3d34..3bfb43a0bef 100644
--- a/tests/rustdoc/struct-arg-pattern.rs
+++ b/tests/rustdoc/struct-arg-pattern.rs
@@ -4,7 +4,7 @@ struct BodyId {
     hir_id: usize,
 }
 
-// @has 'foo/fn.body_owner.html' '//*[@class="rust fn"]' 'pub fn body_owner(_: BodyId)'
+// @has 'foo/fn.body_owner.html' '//div[@class="item-decl"]/pre[@class="rust"]' 'pub fn body_owner(_: BodyId)'
 pub fn body_owner(BodyId { hir_id }: BodyId) {
     // ...
 }