File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -71,21 +71,36 @@ fn write_mod(
71
71
72
72
fn write_mod_contents (
73
73
ctxt : ctxt ,
74
- moddoc : doc:: moddoc
74
+ doc : doc:: moddoc
75
75
) {
76
- for fndoc in * moddoc. fns {
76
+ write_brief ( ctxt, doc. brief ) ;
77
+ write_desc ( ctxt, doc. desc ) ;
78
+
79
+ for fndoc in * doc. fns {
77
80
subsection ( ctxt) { ||
78
81
write_fn ( ctxt, fndoc) ;
79
82
}
80
83
}
81
84
82
- for moddoc in * moddoc . mods {
85
+ for moddoc in * doc . mods {
83
86
subsection ( ctxt) { ||
84
87
write_mod ( ctxt, moddoc) ;
85
88
}
86
89
}
87
90
}
88
91
92
+ #[ test]
93
+ fn should_write_crate_brief_description ( ) {
94
+ let markdown = test:: render ( "#[doc(brief = \" this is the crate\" )];" ) ;
95
+ assert str:: contains ( markdown, "this is the crate" ) ;
96
+ }
97
+
98
+ #[ test]
99
+ fn should_write_crate_description ( ) {
100
+ let markdown = test:: render ( "#[doc = \" this is the crate\" ];" ) ;
101
+ assert str:: contains ( markdown, "this is the crate" ) ;
102
+ }
103
+
89
104
fn write_fn (
90
105
ctxt : ctxt ,
91
106
doc : doc:: fndoc
You can’t perform that action at this time.
0 commit comments