Remove a redundant function argument
This commit is contained in:
parent
8f132d8549
commit
9fb91b8742
@ -16,7 +16,6 @@ use rustc_ast_pretty::pprust;
|
|||||||
use rustc_attr::{self as attr, TransparencyError};
|
use rustc_attr::{self as attr, TransparencyError};
|
||||||
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
|
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
|
||||||
use rustc_errors::{Applicability, ErrorGuaranteed};
|
use rustc_errors::{Applicability, ErrorGuaranteed};
|
||||||
use rustc_feature::Features;
|
|
||||||
use rustc_lint_defs::builtin::{
|
use rustc_lint_defs::builtin::{
|
||||||
RUST_2021_INCOMPATIBLE_OR_PATTERNS, SEMICOLON_IN_EXPRESSIONS_FROM_MACROS,
|
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.
|
/// Converts a macro item into a syntax extension.
|
||||||
pub fn compile_declarative_macro(
|
pub fn compile_declarative_macro(
|
||||||
sess: &Session,
|
sess: &Session,
|
||||||
features: &Features,
|
|
||||||
def: &ast::Item,
|
def: &ast::Item,
|
||||||
edition: Edition,
|
edition: Edition,
|
||||||
) -> (SyntaxExtension, Vec<(usize, Span)>) {
|
) -> (SyntaxExtension, Vec<(usize, Span)>) {
|
||||||
@ -508,7 +506,7 @@ pub fn compile_declarative_macro(
|
|||||||
true,
|
true,
|
||||||
&sess.parse_sess,
|
&sess.parse_sess,
|
||||||
def.id,
|
def.id,
|
||||||
features,
|
sess.features_untracked(),
|
||||||
edition,
|
edition,
|
||||||
)
|
)
|
||||||
.pop()
|
.pop()
|
||||||
@ -532,7 +530,7 @@ pub fn compile_declarative_macro(
|
|||||||
false,
|
false,
|
||||||
&sess.parse_sess,
|
&sess.parse_sess,
|
||||||
def.id,
|
def.id,
|
||||||
features,
|
sess.features_untracked(),
|
||||||
edition,
|
edition,
|
||||||
)
|
)
|
||||||
.pop()
|
.pop()
|
||||||
|
@ -878,12 +878,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||||||
item: &ast::Item,
|
item: &ast::Item,
|
||||||
edition: Edition,
|
edition: Edition,
|
||||||
) -> (SyntaxExtension, Vec<(usize, Span)>) {
|
) -> (SyntaxExtension, Vec<(usize, Span)>) {
|
||||||
let (mut result, mut rule_spans) = compile_declarative_macro(
|
let (mut result, mut rule_spans) = compile_declarative_macro(self.tcx.sess, item, edition);
|
||||||
&self.tcx.sess,
|
|
||||||
self.tcx.sess.features_untracked(),
|
|
||||||
item,
|
|
||||||
edition,
|
|
||||||
);
|
|
||||||
|
|
||||||
if let Some(builtin_name) = result.builtin_name {
|
if let Some(builtin_name) = result.builtin_name {
|
||||||
// The macro was marked with `#[rustc_builtin_macro]`.
|
// The macro was marked with `#[rustc_builtin_macro]`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user