File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -641,7 +641,7 @@ where
641
641
self . prev_span_end = ( self . get_hi ) ( & item) + BytePos ( comment_end as u32 ) ;
642
642
let post_snippet = post_snippet[ ..comment_end] . trim ( ) ;
643
643
644
- let post_snippet_trimmed = if post_snippet. starts_with ( ', ') {
644
+ let post_snippet_trimmed = if post_snippet. starts_with ( |c| c == ',' || c == ': ') {
645
645
post_snippet[ 1 ..] . trim_matches ( white_space)
646
646
} else if post_snippet. ends_with ( ',' ) {
647
647
post_snippet[ ..( post_snippet. len ( ) - 1 ) ] . trim_matches ( white_space)
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ pub struct Foo {
15
15
pub i : TypeForPublicField
16
16
}
17
17
18
+ // #1095
19
+ struct S < T : /* comment */ > {
20
+ t : T ,
21
+ }
22
+
18
23
// #1029
19
24
pub struct Foo {
20
25
#[ doc( hidden) ]
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ pub struct Foo {
14
14
pub i : TypeForPublicField ,
15
15
}
16
16
17
+ // #1095
18
+ struct S < T /* comment */ > {
19
+ t : T ,
20
+ }
21
+
17
22
// #1029
18
23
pub struct Foo {
19
24
#[ doc( hidden) ]
You can’t perform that action at this time.
0 commit comments