yeet ConstInferUnifier

This commit is contained in:
Michael Goulet
2023-05-04 21:10:12 +00:00
parent c270b0a8a8
commit 4ce2123ecc
3 changed files with 81 additions and 180 deletions

View File

@@ -1070,6 +1070,24 @@ impl ParamTerm {
}
}
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub enum TermVid<'tcx> {
Ty(ty::TyVid),
Const(ty::ConstVid<'tcx>),
}
impl From<ty::TyVid> for TermVid<'_> {
fn from(value: ty::TyVid) -> Self {
TermVid::Ty(value)
}
}
impl<'tcx> From<ty::ConstVid<'tcx>> for TermVid<'tcx> {
fn from(value: ty::ConstVid<'tcx>) -> Self {
TermVid::Const(value)
}
}
/// This kind of predicate has no *direct* correspondent in the
/// syntax, but it roughly corresponds to the syntactic forms:
///