diff options
| author | Michael Howell <michael@notriddle.com> | 2022-12-12 12:46:11 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-12-12 12:49:29 -0700 |
| commit | 7e64cebf97df021b7ece9df435e748652e0b2e83 (patch) | |
| tree | aca5d99dfccea794aa55bb6b2a14e34c4dc851c0 /src/librustdoc/html/render/mod.rs | |
| parent | 37d7de337903a558dbeb1e82c844fe915ab8ff25 (diff) | |
| download | rust-7e64cebf97df021b7ece9df435e748652e0b2e83.tar.gz rust-7e64cebf97df021b7ece9df435e748652e0b2e83.zip | |
rustdoc: stop treating everything in a trait item as a method
This was added in 0b9b4b70683db6ef707755f520f139eb7b92a944 to fix the spacing on trait pages, but stopped being needed because 791f04e5a47ee78951552c7ed1545b2b01a44c74 stopped styling method-toggle. By only putting the method-toggle class on actual methods, the JS setting does the right thing.
Diffstat (limited to 'src/librustdoc/html/render/mod.rs')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 36d15ec3b86..80fbe9c1f06 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -1512,8 +1512,7 @@ fn render_impl( let toggled = !doc_buffer.is_empty(); if toggled { - let method_toggle_class = - if item_type == ItemType::Method { " method-toggle" } else { "" }; + let method_toggle_class = if item_type.is_method() { " method-toggle" } else { "" }; write!(w, "<details class=\"rustdoc-toggle{}\" open><summary>", method_toggle_class); } match &*item.kind { |
