@@ -382,9 +382,7 @@ fn nameize<I: Iterator<Item = NamedMatch>>(
382382 n_rec ( sess, next_m, res. by_ref ( ) , ret_val) ?;
383383 } ,
384384 TokenTree :: MetaVarDecl ( span, _, id) if id. name == kw:: Invalid => {
385- if sess. missing_fragment_specifiers . borrow_mut ( ) . remove ( & span) {
386- return Err ( ( span, "missing fragment specifier" . to_string ( ) ) ) ;
387- }
385+ return Err ( ( span, "missing fragment specifier" . to_string ( ) ) ) ;
388386 }
389387 TokenTree :: MetaVarDecl ( sp, bind_name, _) => {
390388 match ret_val. entry ( bind_name) {
@@ -444,7 +442,6 @@ fn token_name_eq(t1: &Token, t2: &Token) -> bool {
444442///
445443/// # Parameters
446444///
447- /// - `sess`: the parsing session into which errors are emitted.
448445/// - `cur_items`: the set of current items to be processed. This should be empty by the end of a
449446/// successful execution of this function.
450447/// - `next_items`: the set of newly generated items. These are used to replenish `cur_items` in
@@ -459,7 +456,6 @@ fn token_name_eq(t1: &Token, t2: &Token) -> bool {
459456///
460457/// A `ParseResult`. Note that matches are kept track of through the items generated.
461458fn inner_parse_loop < ' root , ' tt > (
462- sess : & ParseSess ,
463459 cur_items : & mut SmallVec < [ MatcherPosHandle < ' root , ' tt > ; 1 ] > ,
464460 next_items : & mut Vec < MatcherPosHandle < ' root , ' tt > > ,
465461 eof_items : & mut SmallVec < [ MatcherPosHandle < ' root , ' tt > ; 1 ] > ,
@@ -585,9 +581,7 @@ fn inner_parse_loop<'root, 'tt>(
585581
586582 // We need to match a metavar (but the identifier is invalid)... this is an error
587583 TokenTree :: MetaVarDecl ( span, _, id) if id. name == kw:: Invalid => {
588- if sess. missing_fragment_specifiers . borrow_mut ( ) . remove ( & span) {
589- return Error ( span, "missing fragment specifier" . to_string ( ) ) ;
590- }
584+ return Error ( span, "missing fragment specifier" . to_string ( ) ) ;
591585 }
592586
593587 // We need to match a metavar with a valid ident... call out to the black-box
@@ -689,7 +683,6 @@ pub fn parse(
689683 // parsing from the black-box parser done. The result is that `next_items` will contain a
690684 // bunch of possible next matcher positions in `next_items`.
691685 match inner_parse_loop (
692- sess,
693686 & mut cur_items,
694687 & mut next_items,
695688 & mut eof_items,
0 commit comments