3a3f70c94e
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.
4fd061c426/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 commit 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`.
32 lines
1.1 KiB
Rust
32 lines
1.1 KiB
Rust
#![crate_name = "user"]
|
|
|
|
// aux-crate:dyn_trait=dyn_trait.rs
|
|
// edition:2021
|
|
|
|
// @has user/type.Ty0.html
|
|
// @has - '//*[@class="item-decl"]//code' "dyn for<'any> FnOnce(&'any str) -> bool + 'static"
|
|
// FIXME(fmease): Hide default lifetime bound `'static`
|
|
pub use dyn_trait::Ty0;
|
|
|
|
// @has user/type.Ty1.html
|
|
// @has - '//*[@class="item-decl"]//code' "dyn Display + 'obj"
|
|
pub use dyn_trait::Ty1;
|
|
|
|
// @has user/type.Ty2.html
|
|
// @has - '//*[@class="item-decl"]//code' "dyn for<'a, 'r> Container<'r, Item<'a, 'static> = ()>"
|
|
pub use dyn_trait::Ty2;
|
|
|
|
// @has user/type.Ty3.html
|
|
// @has - '//*[@class="item-decl"]//code' "&'s (dyn ToString + 's)"
|
|
// FIXME(fmease): Hide default lifetime bound, render "&'s dyn ToString"
|
|
pub use dyn_trait::Ty3;
|
|
|
|
// @has user/fn.func0.html
|
|
// @has - '//div[@class="item-decl"]/pre[@class="rust"]' "func0(_: &dyn Fn())"
|
|
// FIXME(fmease): Show placeholder-lifetime bound, render "func0(_: &(dyn Fn() + '_))"
|
|
pub use dyn_trait::func0;
|
|
|
|
// @has user/fn.func1.html
|
|
// @has - '//div[@class="item-decl"]/pre[@class="rust"]' "func1<'func>(_: &(dyn Fn() + 'func))"
|
|
pub use dyn_trait::func1;
|