@@ -77,7 +77,6 @@ use crate::mbe::{KleeneOp, TokenTree};
7777
7878use rustc_ast:: token:: { self , DocComment , Nonterminal , NonterminalKind , Token } ;
7979use rustc_parse:: parser:: { NtOrTt , Parser } ;
80- use rustc_session:: parse:: ParseSess ;
8180use rustc_span:: symbol:: MacroRulesNormalizedIdent ;
8281use rustc_span:: Span ;
8382
@@ -128,9 +127,8 @@ pub(super) enum MatcherLoc {
128127 Eof ,
129128}
130129
131- pub ( super ) fn compute_locs ( sess : & ParseSess , matcher : & [ TokenTree ] ) -> Vec < MatcherLoc > {
130+ pub ( super ) fn compute_locs ( matcher : & [ TokenTree ] ) -> Vec < MatcherLoc > {
132131 fn inner (
133- sess : & ParseSess ,
134132 tts : & [ TokenTree ] ,
135133 locs : & mut Vec < MatcherLoc > ,
136134 next_metavar : & mut usize ,
@@ -147,7 +145,7 @@ pub(super) fn compute_locs(sess: &ParseSess, matcher: &[TokenTree]) -> Vec<Match
147145
148146 locs. push ( MatcherLoc :: Delimited ) ;
149147 locs. push ( MatcherLoc :: Token { token : open_token } ) ;
150- inner ( sess , & delimited. tts , locs, next_metavar, seq_depth) ;
148+ inner ( & delimited. tts , locs, next_metavar, seq_depth) ;
151149 locs. push ( MatcherLoc :: Token { token : close_token } ) ;
152150 }
153151 TokenTree :: Sequence ( _, seq) => {
@@ -162,7 +160,7 @@ pub(super) fn compute_locs(sess: &ParseSess, matcher: &[TokenTree]) -> Vec<Match
162160 let op = seq. kleene . op ;
163161 let idx_first = locs. len ( ) ;
164162 let idx_seq = idx_first - 1 ;
165- inner ( sess , & seq. tts , locs, next_metavar, seq_depth + 1 ) ;
163+ inner ( & seq. tts , locs, next_metavar, seq_depth + 1 ) ;
166164
167165 if let Some ( separator) = & seq. separator {
168166 locs. push ( MatcherLoc :: SequenceSep { separator : separator. clone ( ) } ) ;
@@ -197,7 +195,7 @@ pub(super) fn compute_locs(sess: &ParseSess, matcher: &[TokenTree]) -> Vec<Match
197195
198196 let mut locs = vec ! [ ] ;
199197 let mut next_metavar = 0 ;
200- inner ( sess , matcher, & mut locs, & mut next_metavar, /* seq_depth */ 0 ) ;
198+ inner ( matcher, & mut locs, & mut next_metavar, /* seq_depth */ 0 ) ;
201199
202200 // A final entry is needed for eof.
203201 locs. push ( MatcherLoc :: Eof ) ;
0 commit comments