diff options
| author | Michael Goulet <michael@errs.io> | 2023-03-07 04:17:37 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-03-07 17:11:35 +0000 |
| commit | 8d13454498cf422c95352e96c1459f6904acde7b (patch) | |
| tree | deb11f86479bd637f52d2d7a748250be35ea69c1 /compiler/rustc_infer/src/infer | |
| parent | 160c2ebeca7b4e616962134f230de754fa5433b1 (diff) | |
| download | rust-8d13454498cf422c95352e96c1459f6904acde7b.tar.gz rust-8d13454498cf422c95352e96c1459f6904acde7b.zip | |
Canonicalize the ROOT VAR
Diffstat (limited to 'compiler/rustc_infer/src/infer')
| -rw-r--r-- | compiler/rustc_infer/src/infer/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index 387843ee693..92037f89c69 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -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 |
