about summary refs log tree commit diff
path: root/tests/rustdoc/inline-default-methods.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/inline-default-methods.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/inline-default-methods.rs')
-rw-r--r--tests/rustdoc/inline-default-methods.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/rustdoc/inline-default-methods.rs b/tests/rustdoc/inline-default-methods.rs
index c97644e7f87..a4ca928f333 100644
--- a/tests/rustdoc/inline-default-methods.rs
+++ b/tests/rustdoc/inline-default-methods.rs
@@ -4,6 +4,6 @@
 extern crate inline_default_methods;
 
 // @has inline_default_methods/trait.Foo.html
-// @has - '//*[@class="rust trait"]' 'fn bar(&self);'
-// @has - '//*[@class="rust trait"]' 'fn foo(&mut self) { ... }'
+// @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'fn bar(&self);'
+// @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'fn foo(&mut self) { ... }'
 pub use inline_default_methods::Foo;