Skip to content

Commit 9fb91b8

Browse files
committed
Remove a redundant function argument
1 parent 8f132d8 commit 9fb91b8

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

compiler/rustc_expand/src/mbe/macro_rules.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use rustc_ast_pretty::pprust;
1616
use rustc_attr::{self as attr, TransparencyError};
1717
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
1818
use rustc_errors::{Applicability, ErrorGuaranteed};
19-
use rustc_feature::Features;
2019
use rustc_lint_defs::builtin::{
2120
RUST_2021_INCOMPATIBLE_OR_PATTERNS, SEMICOLON_IN_EXPRESSIONS_FROM_MACROS,
2221
};
@@ -379,7 +378,6 @@ pub(super) fn try_match_macro<'matcher, T: Tracker<'matcher>>(
379378
/// Converts a macro item into a syntax extension.
380379
pub fn compile_declarative_macro(
381380
sess: &Session,
382-
features: &Features,
383381
def: &ast::Item,
384382
edition: Edition,
385383
) -> (SyntaxExtension, Vec<(usize, Span)>) {
@@ -508,7 +506,7 @@ pub fn compile_declarative_macro(
508506
true,
509507
&sess.parse_sess,
510508
def.id,
511-
features,
509+
sess.features_untracked(),
512510
edition,
513511
)
514512
.pop()
@@ -532,7 +530,7 @@ pub fn compile_declarative_macro(
532530
false,
533531
&sess.parse_sess,
534532
def.id,
535-
features,
533+
sess.features_untracked(),
536534
edition,
537535
)
538536
.pop()

compiler/rustc_resolve/src/macros.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -878,12 +878,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
878878
item: &ast::Item,
879879
edition: Edition,
880880
) -> (SyntaxExtension, Vec<(usize, Span)>) {
881-
let (mut result, mut rule_spans) = compile_declarative_macro(
882-
&self.tcx.sess,
883-
self.tcx.sess.features_untracked(),
884-
item,
885-
edition,
886-
);
881+
let (mut result, mut rule_spans) = compile_declarative_macro(self.tcx.sess, item, edition);
887882

888883
if let Some(builtin_name) = result.builtin_name {
889884
// The macro was marked with `#[rustc_builtin_macro]`.

0 commit comments

Comments
 (0)