aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-02-28 13:36:44 +0000
committerGitHub <[email protected]>2021-02-28 13:36:44 +0000
commit803ff2e55eeb6bd1d9028fbbffe34721f0e6d459 (patch)
treec0df3cba7d22fe49e1ea33dde6ed8d4c9e0f663f /crates/hir_ty/src/infer.rs
parent7f57a01b3d524a5ed85a30265b8aee2c81118f15 (diff)
parent7c2dd85a32e320fd412a720ea5b847c66bf246ae (diff)
Merge #7804
7804: Introduce TypeCtor::Scalar r=lnicola a=Veykril `TypeCtor::Int(..) | TypeCtor::Float(..) | TypeCtor::Char | TypeCtor::Bool` => `TypeCtor::Scalar(..)`, in this case we can actually just straight up use `chalk_ir::Scalar` already since its just a POD without any IDs or anything. Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
-rw-r--r--crates/hir_ty/src/infer.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs
index 4b683c5a7..657f011d2 100644
--- a/crates/hir_ty/src/infer.rs
+++ b/crates/hir_ty/src/infer.rs
@@ -41,7 +41,7 @@ use super::{
41 InEnvironment, ProjectionTy, Substs, TraitEnvironment, TraitRef, Ty, TypeCtor, TypeWalk, 41 InEnvironment, ProjectionTy, Substs, TraitEnvironment, TraitRef, Ty, TypeCtor, TypeWalk,
42}; 42};
43use crate::{ 43use crate::{
44 db::HirDatabase, infer::diagnostics::InferenceDiagnostic, lower::ImplTraitLoweringMode, 44 db::HirDatabase, infer::diagnostics::InferenceDiagnostic, lower::ImplTraitLoweringMode, Scalar,
45}; 45};
46 46
47pub(crate) use unify::unify; 47pub(crate) use unify::unify;
@@ -684,8 +684,8 @@ impl InferTy {
684 fn fallback_value(self) -> Ty { 684 fn fallback_value(self) -> Ty {
685 match self { 685 match self {
686 InferTy::TypeVar(..) => Ty::Unknown, 686 InferTy::TypeVar(..) => Ty::Unknown,
687 InferTy::IntVar(..) => Ty::simple(TypeCtor::Int(IntTy::i32())), 687 InferTy::IntVar(..) => Ty::simple(TypeCtor::Scalar(Scalar::Int(IntTy::I32))),
688 InferTy::FloatVar(..) => Ty::simple(TypeCtor::Float(FloatTy::f64())), 688 InferTy::FloatVar(..) => Ty::simple(TypeCtor::Scalar(Scalar::Float(FloatTy::F64))),
689 InferTy::MaybeNeverTypeVar(..) => Ty::simple(TypeCtor::Never), 689 InferTy::MaybeNeverTypeVar(..) => Ty::simple(TypeCtor::Never),
690 } 690 }
691 } 691 }