Update w/ comments

Removes uses of ty() where a method is implemented on TypeFoldable, and also directly formats
a Term.
This commit is contained in:
kadmin 2022-01-11 19:18:18 +00:00
parent a783912d2c
commit 109583e215

View File

@ -2143,7 +2143,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
if let ty::PredicateKind::Projection(projection_predicate) = predicate.kind().skip_binder() {
let assoc_ty = match projection_predicate.term {
ty::Term::Ty(ty) => ty,
ty::Term::Const(c) => c.ty,
ty::Term::Const(_c) => continue,
};
// walk the associated type and check for Self
if let Some(self_adt) = self_ty.ty_adt_def() {