aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
-rw-r--r--crates/hir_ty/src/infer.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs
index efe9198cc..75d633c96 100644
--- a/crates/hir_ty/src/infer.rs
+++ b/crates/hir_ty/src/infer.rs
@@ -683,25 +683,6 @@ impl<'a> InferenceContext<'a> {
683 } 683 }
684} 684}
685 685
686/// The kinds of placeholders we need during type inference. There's separate
687/// values for general types, and for integer and float variables. The latter
688/// two are used for inference of literal values (e.g. `100` could be one of
689/// several integer types).
690#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
691pub struct InferenceVar {
692 index: u32,
693}
694
695impl InferenceVar {
696 fn to_inner(self) -> unify::TypeVarId {
697 unify::TypeVarId(self.index)
698 }
699
700 fn from_inner(unify::TypeVarId(index): unify::TypeVarId) -> Self {
701 InferenceVar { index }
702 }
703}
704
705/// When inferring an expression, we propagate downward whatever type hint we 686/// When inferring an expression, we propagate downward whatever type hint we
706/// are able in the form of an `Expectation`. 687/// are able in the form of an `Expectation`.
707#[derive(Clone, PartialEq, Eq, Debug)] 688#[derive(Clone, PartialEq, Eq, Debug)]