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<()> {
8080 continue ;
8181 }
8282 break ;
83+ } else if s. starts_with ( "/**/" ) {
84+ i += 4 ;
85+ continue
8386 } else if s. starts_with ( "/*" ) && ( !s. starts_with ( "/**" ) || s. starts_with ( "/***" ) ) &&
8487 !s. starts_with ( "/*!" ) {
8588 let ( _, com) = block_comment ( s) ?;
Original file line number Diff line number Diff line change @@ -170,3 +170,10 @@ fn no_panic() {
170170 assert ! ( s. parse:: <proc_macro2:: TokenStream >( ) . is_err( ) ) ;
171171}
172172
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