1
Fork 0

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 e7529d6a38
commit f396888c4d
10 changed files with 21 additions and 32 deletions

View file

@ -1580,10 +1580,9 @@ impl<'tcx> ExistentialProjection<'tcx> {
) -> Self {
// Assert there is a Self.
projection_predicate.projection_ty.substs.type_at(0);
let ty = if let Term::Ty(ty) = projection_predicate.term {
ty
} else {
panic!("Only types are permitted here");
let ty = match projection_predicate.term {
Term::Ty(ty) => ty,
Term::Const(_c) => unimplemented!(),
};
Self {