@@ -59,12 +59,11 @@ impl<'a> Parser<'a> {
59
59
60
60
let post_attr_lo = self . token . span ;
61
61
let mut items = vec ! [ ] ;
62
- debug ! ( "fails to parse an item!" ) ;
63
62
while let Some ( item) = self . parse_item ( ForceCollect :: No ) ? {
64
63
items. push ( item) ;
65
64
self . maybe_consume_incorrect_semicolon ( & items) ;
66
65
}
67
- debug ! ( "Does not make it here!" ) ;
66
+
68
67
if !self . eat ( term) {
69
68
let token_str = super :: token_descr ( & self . token ) ;
70
69
if !self . maybe_consume_incorrect_semicolon ( & items) {
@@ -111,7 +110,6 @@ impl<'a> Parser<'a> {
111
110
fn_parse_mode : FnParseMode ,
112
111
force_collect : ForceCollect ,
113
112
) -> PResult < ' a , Option < Item > > {
114
- debug ! ( "fn parse_item_common" ) ;
115
113
// Don't use `maybe_whole` so that we have precise control
116
114
// over when we bump the parser
117
115
if let token:: Interpolated ( nt) = & self . token . kind && let token:: NtItem ( item) = & * * nt {
@@ -127,10 +125,10 @@ impl<'a> Parser<'a> {
127
125
self . collect_tokens_trailing_token ( attrs, force_collect, |this : & mut Self , attrs| {
128
126
let item =
129
127
this. parse_item_common_ ( attrs, mac_allowed, attrs_allowed, fn_parse_mode) ;
130
- debug ! ( ?item) ;
131
128
unclosed_delims. append ( & mut this. unclosed_delims ) ;
132
129
Ok ( ( item?, TrailingToken :: None ) )
133
130
} ) ?;
131
+
134
132
self . unclosed_delims . append ( & mut unclosed_delims) ;
135
133
Ok ( item)
136
134
}
@@ -215,7 +213,6 @@ impl<'a> Parser<'a> {
215
213
self . parse_use_item ( ) ?
216
214
} else if self . check_fn_front_matter ( def_final) {
217
215
// FUNCTION ITEM
218
- debug ! ( "parse_item_kind: inside fn item" ) ;
219
216
let ( ident, sig, generics, body) = self . parse_fn ( attrs, fn_parse_mode, lo, vis) ?;
220
217
( ident, ItemKind :: Fn ( Box :: new ( Fn { defaultness : def ( ) , sig, generics, body } ) ) )
221
218
} else if self . eat_keyword ( kw:: Extern ) {
0 commit comments