File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -517,7 +517,7 @@ pub fn fields(
517
517
} ) ;
518
518
}
519
519
} else {
520
- let description = & f. description ;
520
+ let description = & util :: escape_brackets ( & f. description ) ;
521
521
let pc_r = & f. pc_r ;
522
522
let sc = & f. sc ;
523
523
r_impl_items. push ( quote ! {
@@ -682,7 +682,7 @@ pub fn fields(
682
682
683
683
if base. is_none ( ) {
684
684
let variants_pc = variants. iter ( ) . map ( |v| & v. pc ) ;
685
- let variants_doc = variants. iter ( ) . map ( |v| & * v. doc ) ;
685
+ let variants_doc = variants. iter ( ) . map ( |v| util :: escape_brackets ( & v. doc ) . to_owned ( ) ) ;
686
686
mod_items. push ( quote ! {
687
687
#[ doc = #pc_w_doc]
688
688
pub enum #pc_w {
@@ -788,7 +788,7 @@ pub fn fields(
788
788
}
789
789
} ) ;
790
790
791
- let description = & f. description ;
791
+ let description = & util :: escape_brackets ( & f. description ) ;
792
792
let sc = & f. sc ;
793
793
w_impl_items. push ( quote ! {
794
794
#[ doc = #description]
You can’t perform that action at this time.
0 commit comments