Pack Term
in the same way as GenericArg
.
This shrinks the `PredicateS` type, which is instanted frequently.
This commit is contained in:
parent
d565d51071
commit
79db32b64e
20 changed files with 191 additions and 108 deletions
|
@ -353,12 +353,11 @@ pub enum ValuePairs<'tcx> {
|
|||
|
||||
impl<'tcx> ValuePairs<'tcx> {
|
||||
pub fn ty(&self) -> Option<(Ty<'tcx>, Ty<'tcx>)> {
|
||||
if let ValuePairs::Terms(ExpectedFound {
|
||||
expected: ty::Term::Ty(expected),
|
||||
found: ty::Term::Ty(found),
|
||||
}) = self
|
||||
if let ValuePairs::Terms(ExpectedFound { expected, found }) = self
|
||||
&& let Some(expected) = expected.ty()
|
||||
&& let Some(found) = found.ty()
|
||||
{
|
||||
Some((*expected, *found))
|
||||
Some((expected, found))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue