about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-05-29 16:25:05 -0700
committerGitHub <noreply@github.com>2022-05-29 16:25:05 -0700
commitf20bbc1fb0a4812b6e51eef52908a635d47bb394 (patch)
treee7baaf3605d6b842b2322d91538c6528204241c9
parent8e01595d9b4c5069a2616039b62719eeb8709fee (diff)
parent311aacf0d0bcdbb9874d83e1f8fe0fb76aeecb96 (diff)
downloadrust-f20bbc1fb0a4812b6e51eef52908a635d47bb394.tar.gz
rust-f20bbc1fb0a4812b6e51eef52908a635d47bb394.zip
Rollup merge of #97536 - est31:remove_unused_lifetimes, r=compiler-errors
Remove unused lifetimes from expand_macro

The function doesn't need the lifetimes
of the two arguments be bound together.
-rw-r--r--compiler/rustc_expand/src/mbe/macro_rules.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_expand/src/mbe/macro_rules.rs b/compiler/rustc_expand/src/mbe/macro_rules.rs
index b16fa7111c5..b86304ba6b1 100644
--- a/compiler/rustc_expand/src/mbe/macro_rules.rs
+++ b/compiler/rustc_expand/src/mbe/macro_rules.rs
@@ -204,7 +204,7 @@ fn trace_macros_note(cx_expansions: &mut FxHashMap<Span, Vec<String>>, sp: Span,
 
 /// Expands the rules based macro defined by `lhses` and `rhses` for a given
 /// input `arg`.
-fn expand_macro<'cx, 'tt>(
+fn expand_macro<'cx>(
     cx: &'cx mut ExtCtxt<'_>,
     sp: Span,
     def_span: Span,
@@ -212,8 +212,8 @@ fn expand_macro<'cx, 'tt>(
     name: Ident,
     transparency: Transparency,
     arg: TokenStream,
-    lhses: &'tt [Vec<MatcherLoc>],
-    rhses: &'tt [mbe::TokenTree],
+    lhses: &[Vec<MatcherLoc>],
+    rhses: &[mbe::TokenTree],
 ) -> Box<dyn MacResult + 'cx> {
     let sess = &cx.sess.parse_sess;
     // Macros defined in the current crate have a real node id,