This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
librustdoc/html/static/js Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -891,7 +891,7 @@ function hideThemeButtonState() {
891
891
if ( e . target . tagName != "SUMMARY" ) {
892
892
e . preventDefault ( ) ;
893
893
}
894
- } )
894
+ } ) ;
895
895
} ) ;
896
896
897
897
onEachLazy ( document . getElementsByClassName ( "notable-traits" ) , function ( e ) {
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ pub struct Foo {
22
22
}
23
23
24
24
impl Foo {
25
+ /// Some documentation
26
+ /// # A Heading
25
27
pub fn a_method ( & self ) { }
26
28
}
27
29
Original file line number Diff line number Diff line change
1
+ // This test ensures that clicking on a method summary, but not on the "[-]",
2
+ // doesn't toggle the <details>.
3
+ goto: file://|DOC_PATH|/test_docs/struct.Foo.html
4
+ assert-attribute: (".impl-items .rustdoc-toggle", {"open": ""})
5
+ click: "h4.code-header" // This is the position of "pub" in "pub fn a_method"
6
+ assert-attribute: (".impl-items .rustdoc-toggle", {"open": ""})
7
+ click: ".impl-items .rustdoc-toggle summary::before" // This is the position of "[-]" next to that pub fn.
8
+ assert-attribute-false: (".impl-items .rustdoc-toggle", {"open": ""})
You can’t perform that action at this time.
0 commit comments