Remove hir::Item::attrs.

This commit is contained in:
Camille GILLOT
2021-01-24 13:17:54 +01:00
parent 5474f17011
commit c701872a6c
32 changed files with 104 additions and 76 deletions

View File

@@ -751,8 +751,9 @@ impl Visitor<'tcx> for Checker<'tcx> {
// error if all involved types and traits are stable, because
// it will have no effect.
// See: https://github.com/rust-lang/rust/issues/55436
let attrs = self.tcx.hir().attrs(item.hir_id());
if let (Some((Stability { level: attr::Unstable { .. }, .. }, span)), _) =
attr::find_stability(&self.tcx.sess, &item.attrs, item.span)
attr::find_stability(&self.tcx.sess, attrs, item.span)
{
let mut c = CheckTraitImplStable { tcx: self.tcx, fully_stable: true };
c.visit_ty(self_ty);