about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-05-04 21:10:12 +0000
committerMichael Goulet <michael@errs.io>2023-05-15 16:40:42 +0000
commit4ce2123ecc2b23b270cf869dff2dacb4f72cf745 (patch)
treefad9e630e566f833d8ca63482c261adc7922e1c3 /compiler/rustc_middle/src
parentc270b0a8a844f0bac1ee1acd8a1ebabc0cee65e7 (diff)
downloadrust-4ce2123ecc2b23b270cf869dff2dacb4f72cf745.tar.gz
rust-4ce2123ecc2b23b270cf869dff2dacb4f72cf745.zip
yeet ConstInferUnifier
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/ty/mod.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs
index b414e1200cd..2fe0b2938ef 100644
--- a/compiler/rustc_middle/src/ty/mod.rs
+++ b/compiler/rustc_middle/src/ty/mod.rs
@@ -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:
 ///