Continue work on assoc const eq

This commit is contained in:
kadmin
2022-01-27 14:40:38 +00:00
parent 21b4a9cfdc
commit 1c4fe64bdc
6 changed files with 471 additions and 152 deletions

View File

@@ -857,6 +857,9 @@ impl<'tcx> Term<'tcx> {
pub fn ty(&self) -> Option<Ty<'tcx>> {
if let Term::Ty(ty) = self { Some(ty) } else { None }
}
pub fn ct(&self) -> Option<&'tcx Const<'tcx>> {
if let Term::Const(c) = self { Some(c) } else { None }
}
}
/// This kind of predicate has no *direct* correspondent in the