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:
parent
e7529d6a38
commit
f396888c4d
10 changed files with 21 additions and 32 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue