1
Fork 0

Canonicalize the ROOT VAR

This commit is contained in:
Michael Goulet 2023-03-07 04:17:37 +00:00
parent 160c2ebeca
commit 8d13454498
5 changed files with 83 additions and 11 deletions

View file

@ -1356,6 +1356,10 @@ impl<'tcx> InferCtxt<'tcx> {
self.inner.borrow_mut().type_variables().root_var(var)
}
pub fn root_const_var(&self, var: ty::ConstVid<'tcx>) -> ty::ConstVid<'tcx> {
self.inner.borrow_mut().const_unification_table().find(var)
}
/// Where possible, replaces type/const variables in
/// `value` with their final value. Note that region variables
/// are unaffected. If a type/const variable has not been unified, it