File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ pub fn whitespace(input: Cursor) -> PResult<()> {
80
80
continue ;
81
81
}
82
82
break ;
83
+ } else if s. starts_with ( "/**/" ) {
84
+ i += 4 ;
85
+ continue
83
86
} else if s. starts_with ( "/*" ) && ( !s. starts_with ( "/**" ) || s. starts_with ( "/***" ) ) &&
84
87
!s. starts_with ( "/*!" ) {
85
88
let ( _, com) = block_comment ( s) ?;
Original file line number Diff line number Diff line change @@ -170,3 +170,10 @@ fn no_panic() {
170
170
assert ! ( s. parse:: <proc_macro2:: TokenStream >( ) . is_err( ) ) ;
171
171
}
172
172
173
+ #[ test]
174
+ fn tricky_doc_commaent ( ) {
175
+ let stream = "/**/" . parse :: < proc_macro2:: TokenStream > ( ) . unwrap ( ) ;
176
+ let tokens = stream. into_iter ( ) . collect :: < Vec < _ > > ( ) ;
177
+ assert ! ( tokens. is_empty( ) , "not empty -- {:?}" , tokens) ;
178
+ }
179
+
You can’t perform that action at this time.
0 commit comments