File tree Expand file tree Collapse file tree 3 files changed +42
-6
lines changed
librustdoc/html/static/css Expand file tree Collapse file tree 3 files changed +42
-6
lines changed Original file line number Diff line number Diff line change @@ -1968,24 +1968,26 @@ in storage.js
19681968 }
19691969}
19701970
1971- .method-toggle > summary ,
19721971.implementors-toggle > summary ,
19731972.impl ,
19741973# implementors-list > .docblock ,
19751974.impl-items > section ,
1976- .methods > section
1975+ .impl-items > .rustdoc-toggle > summary ,
1976+ .methods > section ,
1977+ .methods > .rustdoc-toggle > summary
19771978{
19781979 margin-bottom : 0.75em ;
19791980}
19801981
1981- .method-toggle [open ]: not (: last-child ),
1982+ .impl-items > .rustdoc-toggle [open ]: not (: last-child ),
1983+ .methods > .rustdoc-toggle [open ]: not (: last-child ),
19821984.implementors-toggle [open ]: not (: last-child ) {
19831985 margin-bottom : 2em ;
19841986}
19851987
1986- # trait-implementations-list .method -toggle: not (: last-child ),
1987- # synthetic-implementations-list .method -toggle: not (: last-child ),
1988- # blanket-implementations-list .method -toggle: not (: last-child ) {
1988+ # trait-implementations-list .impl-items > . rustdoc -toggle: not (: last-child ),
1989+ # synthetic-implementations-list .impl-items > . rustdoc -toggle: not (: last-child ),
1990+ # blanket-implementations-list .impl-items > . rustdoc -toggle: not (: last-child ) {
19891991 margin-bottom : 1em ;
19901992}
19911993
Original file line number Diff line number Diff line change 1+ goto: "file://" + |DOC_PATH| + "/test_docs/trait_members/struct.HasTrait.html#impl-TraitMembers-for-HasTrait"
2+
3+ assert-count: ("#trait-implementations-list > .rustdoc-toggle", 1)
4+
5+ compare-elements-css: (
6+ // compare margin on type with margin on method
7+ "#trait-implementations-list .impl-items > .rustdoc-toggle:nth-child(1) > summary",
8+ "#trait-implementations-list .impl-items > .rustdoc-toggle:nth-child(2) > summary",
9+ ["margin"]
10+ )
11+
12+ compare-elements-css: (
13+ // compare margin on type with margin on method
14+ "#trait-implementations-list .impl-items > .rustdoc-toggle:nth-child(1)",
15+ "#trait-implementations-list .impl-items > .rustdoc-toggle:nth-child(2)",
16+ ["margin"]
17+ )
Original file line number Diff line number Diff line change @@ -416,3 +416,20 @@ pub trait TraitWithoutGenerics {
416416
417417 fn foo ( ) ;
418418}
419+
420+ pub mod trait_members {
421+ pub trait TraitMembers {
422+ /// Some type
423+ type Type ;
424+ /// Some function
425+ fn function ( ) ;
426+ /// Some other function
427+ fn function2 ( ) ;
428+ }
429+ pub struct HasTrait ;
430+ impl TraitMembers for HasTrait {
431+ type Type = u8 ;
432+ fn function ( ) { }
433+ fn function2 ( ) { }
434+ }
435+ }
You can’t perform that action at this time.
0 commit comments