Use features() over features_untracked() where possible

This commit is contained in:
León Orell Valerian Liehr 2023-07-22 15:33:51 +02:00
parent c3c5a5c5f7
commit 2a75a0f724
No known key found for this signature in database
GPG Key ID: D17A07215F68E713
2 changed files with 2 additions and 5 deletions

View File

@ -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

View File

@ -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",