mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
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_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()
|
||||
|
@ -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]`.
|
||||
|
Loading…
Reference in New Issue
Block a user