diff --git a/compiler/rustc_expand/src/mbe/macro_parser.rs b/compiler/rustc_expand/src/mbe/macro_parser.rs index 74b8450f756..63aac64989d 100644 --- a/compiler/rustc_expand/src/mbe/macro_parser.rs +++ b/compiler/rustc_expand/src/mbe/macro_parser.rs @@ -77,7 +77,6 @@ use crate::mbe::{KleeneOp, TokenTree}; use rustc_ast::token::{self, DocComment, Nonterminal, NonterminalKind, Token}; use rustc_parse::parser::{NtOrTt, Parser}; -use rustc_session::parse::ParseSess; use rustc_span::symbol::MacroRulesNormalizedIdent; use rustc_span::Span; @@ -128,9 +127,8 @@ pub(super) enum MatcherLoc { Eof, } -pub(super) fn compute_locs(sess: &ParseSess, matcher: &[TokenTree]) -> Vec { +pub(super) fn compute_locs(matcher: &[TokenTree]) -> Vec { fn inner( - sess: &ParseSess, tts: &[TokenTree], locs: &mut Vec, next_metavar: &mut usize, @@ -147,7 +145,7 @@ pub(super) fn compute_locs(sess: &ParseSess, matcher: &[TokenTree]) -> Vec { @@ -162,7 +160,7 @@ pub(super) fn compute_locs(sess: &ParseSess, matcher: &[TokenTree]) -> Vec Vec { - mbe::macro_parser::compute_locs(&sess.parse_sess, &delimited.tts) + mbe::macro_parser::compute_locs(&delimited.tts) } _ => sess.parse_sess.span_diagnostic.span_bug(def.span, "malformed macro lhs"), }