File tree 3 files changed +42
-6
lines changed
librustdoc/html/static/css
3 files changed +42
-6
lines changed Original file line number Diff line number Diff line change @@ -1968,24 +1968,26 @@ in storage.js
1968
1968
}
1969
1969
}
1970
1970
1971
- .method-toggle > summary ,
1972
1971
.implementors-toggle > summary ,
1973
1972
.impl ,
1974
1973
# implementors-list > .docblock ,
1975
1974
.impl-items > section ,
1976
- .methods > section
1975
+ .impl-items > .rustdoc-toggle > summary ,
1976
+ .methods > section ,
1977
+ .methods > .rustdoc-toggle > summary
1977
1978
{
1978
1979
margin-bottom : 0.75em ;
1979
1980
}
1980
1981
1981
- .method-toggle [open ]: not (: last-child ),
1982
+ .impl-items > .rustdoc-toggle [open ]: not (: last-child ),
1983
+ .methods > .rustdoc-toggle [open ]: not (: last-child ),
1982
1984
.implementors-toggle [open ]: not (: last-child ) {
1983
1985
margin-bottom : 2em ;
1984
1986
}
1985
1987
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 ) {
1989
1991
margin-bottom : 1em ;
1990
1992
}
1991
1993
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 {
416
416
417
417
fn foo ( ) ;
418
418
}
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