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() {
891891 if ( e . target . tagName != "SUMMARY" ) {
892892 e . preventDefault ( ) ;
893893 }
894- } )
894+ } ) ;
895895 } ) ;
896896
897897 onEachLazy ( document . getElementsByClassName ( "notable-traits" ) , function ( e ) {
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ pub struct Foo {
2222}
2323
2424impl Foo {
25+ /// Some documentation
26+ /// # A Heading
2527 pub fn a_method ( & self ) { }
2628}
2729
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