Skip to content

Commit cec34a4

Browse files
committed
Auto merge of #113961 - fmease:fewer-features_untracked, r=compiler-errors
Use `features()` over `features_untracked()` where possible `Resolver` has a `TyCtxt` nowadays. `@rustbot` label C-cleanup
2 parents 1c44af9 + 2a75a0f commit cec34a4

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

compiler/rustc_resolve/src/late.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2569,7 +2569,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
25692569
let res = match kind {
25702570
RibKind::Item(..) | RibKind::AssocItem => Res::Def(def_kind, def_id.to_def_id()),
25712571
RibKind::Normal => {
2572-
if self.r.tcx.sess.features_untracked().non_lifetime_binders {
2572+
if self.r.tcx.features().non_lifetime_binders {
25732573
Res::Def(def_kind, def_id.to_def_id())
25742574
} else {
25752575
Res::Err

compiler/rustc_resolve/src/macros.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -576,10 +576,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
576576
}
577577

578578
// We are trying to avoid reporting this error if other related errors were reported.
579-
if res != Res::Err
580-
&& inner_attr
581-
&& !self.tcx.sess.features_untracked().custom_inner_attributes
582-
{
579+
if res != Res::Err && inner_attr && !self.tcx.features().custom_inner_attributes {
583580
let msg = match res {
584581
Res::Def(..) => "inner macro attributes are unstable",
585582
Res::NonMacroAttr(..) => "custom inner attributes are unstable",

0 commit comments

Comments
 (0)