aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/lower.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/lower.rs')
-rw-r--r--crates/ra_hir/src/ty/lower.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs
index 72b1234bf..7f9af307b 100644
--- a/crates/ra_hir/src/ty/lower.rs
+++ b/crates/ra_hir/src/ty/lower.rs
@@ -61,10 +61,10 @@ impl Ty {
61 pub(crate) fn from_hir_path(db: &impl HirDatabase, resolver: &Resolver, path: &Path) -> Self { 61 pub(crate) fn from_hir_path(db: &impl HirDatabase, resolver: &Resolver, path: &Path) -> Self {
62 if let Some(name) = path.as_ident() { 62 if let Some(name) = path.as_ident() {
63 // TODO handle primitive type names in resolver as well? 63 // TODO handle primitive type names in resolver as well?
64 if let Some(int_ty) = primitive::UncertainIntTy::from_type_name(name) { 64 if let Some(int_ty) = primitive::IntTy::from_type_name(name) {
65 return Ty::simple(TypeCtor::Int(int_ty)); 65 return Ty::simple(TypeCtor::Int(primitive::UncertainIntTy::Known(int_ty)));
66 } else if let Some(float_ty) = primitive::UncertainFloatTy::from_type_name(name) { 66 } else if let Some(float_ty) = primitive::FloatTy::from_type_name(name) {
67 return Ty::simple(TypeCtor::Float(float_ty)); 67 return Ty::simple(TypeCtor::Float(primitive::UncertainFloatTy::Known(float_ty)));
68 } else if let Some(known) = name.as_known_name() { 68 } else if let Some(known) = name.as_known_name() {
69 match known { 69 match known {
70 KnownName::Bool => return Ty::simple(TypeCtor::Bool), 70 KnownName::Bool => return Ty::simple(TypeCtor::Bool),