Remove a redundant function argument

This commit is contained in:
Oli Scherer 2022-12-09 22:10:52 +00:00
parent 8f132d8549
commit 9fb91b8742
2 changed files with 3 additions and 10 deletions

View File

@ -16,7 +16,6 @@ use rustc_ast_pretty::pprust;
use rustc_attr::{self as attr, TransparencyError};
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
use rustc_errors::{Applicability, ErrorGuaranteed};
use rustc_feature::Features;
use rustc_lint_defs::builtin::{
RUST_2021_INCOMPATIBLE_OR_PATTERNS, SEMICOLON_IN_EXPRESSIONS_FROM_MACROS,
};
@ -379,7 +378,6 @@ pub(super) fn try_match_macro<'matcher, T: Tracker<'matcher>>(
/// Converts a macro item into a syntax extension.
pub fn compile_declarative_macro(
sess: &Session,
features: &Features,
def: &ast::Item,
edition: Edition,
) -> (SyntaxExtension, Vec<(usize, Span)>) {
@ -508,7 +506,7 @@ pub fn compile_declarative_macro(
true,
&sess.parse_sess,
def.id,
features,
sess.features_untracked(),
edition,
)
.pop()
@ -532,7 +530,7 @@ pub fn compile_declarative_macro(
false,
&sess.parse_sess,
def.id,
features,
sess.features_untracked(),
edition,
)
.pop()

View File

@ -878,12 +878,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
item: &ast::Item,
edition: Edition,
) -> (SyntaxExtension, Vec<(usize, Span)>) {
let (mut result, mut rule_spans) = compile_declarative_macro(
&self.tcx.sess,
self.tcx.sess.features_untracked(),
item,
edition,
);
let (mut result, mut rule_spans) = compile_declarative_macro(self.tcx.sess, item, edition);
if let Some(builtin_name) = result.builtin_name {
// The macro was marked with `#[rustc_builtin_macro]`.