@@ -382,9 +382,7 @@ fn nameize<I: Iterator<Item = NamedMatch>>(
382
382
n_rec ( sess, next_m, res. by_ref ( ) , ret_val) ?;
383
383
} ,
384
384
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 ( ) ) ) ;
388
386
}
389
387
TokenTree :: MetaVarDecl ( sp, bind_name, _) => {
390
388
match ret_val. entry ( bind_name) {
@@ -444,7 +442,6 @@ fn token_name_eq(t1: &Token, t2: &Token) -> bool {
444
442
///
445
443
/// # Parameters
446
444
///
447
- /// - `sess`: the parsing session into which errors are emitted.
448
445
/// - `cur_items`: the set of current items to be processed. This should be empty by the end of a
449
446
/// successful execution of this function.
450
447
/// - `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 {
459
456
///
460
457
/// A `ParseResult`. Note that matches are kept track of through the items generated.
461
458
fn inner_parse_loop < ' root , ' tt > (
462
- sess : & ParseSess ,
463
459
cur_items : & mut SmallVec < [ MatcherPosHandle < ' root , ' tt > ; 1 ] > ,
464
460
next_items : & mut Vec < MatcherPosHandle < ' root , ' tt > > ,
465
461
eof_items : & mut SmallVec < [ MatcherPosHandle < ' root , ' tt > ; 1 ] > ,
@@ -585,9 +581,7 @@ fn inner_parse_loop<'root, 'tt>(
585
581
586
582
// We need to match a metavar (but the identifier is invalid)... this is an error
587
583
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 ( ) ) ;
591
585
}
592
586
593
587
// We need to match a metavar with a valid ident... call out to the black-box
@@ -689,7 +683,6 @@ pub fn parse(
689
683
// parsing from the black-box parser done. The result is that `next_items` will contain a
690
684
// bunch of possible next matcher positions in `next_items`.
691
685
match inner_parse_loop (
692
- sess,
693
686
& mut cur_items,
694
687
& mut next_items,
695
688
& mut eof_items,
0 commit comments