From 97158f5c8a6dadf3bcf28601f739ab6b7c4464aa Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 May 2019 15:03:58 +0300 Subject: add built-in types to scopes --- crates/ra_hir/src/ty/lower.rs | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'crates/ra_hir/src/ty') diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs index c4cef2d7c..d2ba01826 100644 --- a/crates/ra_hir/src/ty/lower.rs +++ b/crates/ra_hir/src/ty/lower.rs @@ -65,22 +65,6 @@ impl Ty { } pub(crate) fn from_hir_path(db: &impl HirDatabase, resolver: &Resolver, path: &Path) -> Self { - if let Some(name) = path.as_ident() { - // TODO: remove this - if let Some(int_ty) = primitive::IntTy::from_type_name(name) { - return Ty::simple(TypeCtor::Int(primitive::UncertainIntTy::Known(int_ty))); - } else if let Some(float_ty) = primitive::FloatTy::from_type_name(name) { - return Ty::simple(TypeCtor::Float(primitive::UncertainFloatTy::Known(float_ty))); - } else if let Some(known) = name.as_known_name() { - match known { - KnownName::Bool => return Ty::simple(TypeCtor::Bool), - KnownName::Char => return Ty::simple(TypeCtor::Char), - KnownName::Str => return Ty::simple(TypeCtor::Str), - _ => {} - } - } - } - // Resolve the path (in type namespace) let resolution = resolver.resolve_path(db, path).take_types(); -- cgit v1.2.3