about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-23 02:03:21 +0000
committerbors <bors@rust-lang.org>2023-07-23 02:03:21 +0000
commitcec34a43b1b14f4e39363f3b283d7ac4f593ee81 (patch)
treef213569a9e0d4e7ffabe875b913379fe6247bfec
parent1c44af9b791c16557b5bf606707bb76df979134a (diff)
parent2a75a0f72401277f1be741ae71a67e1982450ab3 (diff)
downloadrust-cec34a43b1b14f4e39363f3b283d7ac4f593ee81.tar.gz
rust-cec34a43b1b14f4e39363f3b283d7ac4f593ee81.zip
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
-rw-r--r--compiler/rustc_resolve/src/late.rs2
-rw-r--r--compiler/rustc_resolve/src/macros.rs5
2 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs
index 05128a51016..be7ef92d175 100644
--- a/compiler/rustc_resolve/src/late.rs
+++ b/compiler/rustc_resolve/src/late.rs
@@ -2569,7 +2569,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
             let res = match kind {
                 RibKind::Item(..) | RibKind::AssocItem => Res::Def(def_kind, def_id.to_def_id()),
                 RibKind::Normal => {
-                    if self.r.tcx.sess.features_untracked().non_lifetime_binders {
+                    if self.r.tcx.features().non_lifetime_binders {
                         Res::Def(def_kind, def_id.to_def_id())
                     } else {
                         Res::Err
diff --git a/compiler/rustc_resolve/src/macros.rs b/compiler/rustc_resolve/src/macros.rs
index d16b7902f60..266e37e4cef 100644
--- a/compiler/rustc_resolve/src/macros.rs
+++ b/compiler/rustc_resolve/src/macros.rs
@@ -576,10 +576,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
         }
 
         // We are trying to avoid reporting this error if other related errors were reported.
-        if res != Res::Err
-            && inner_attr
-            && !self.tcx.sess.features_untracked().custom_inner_attributes
-        {
+        if res != Res::Err && inner_attr && !self.tcx.features().custom_inner_attributes {
             let msg = match res {
                 Res::Def(..) => "inner macro attributes are unstable",
                 Res::NonMacroAttr(..) => "custom inner attributes are unstable",