diff options
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/lower.rs | 16 |
1 files changed, 0 insertions, 16 deletions
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 { | |||
65 | } | 65 | } |
66 | 66 | ||
67 | pub(crate) fn from_hir_path(db: &impl HirDatabase, resolver: &Resolver, path: &Path) -> Self { | 67 | pub(crate) fn from_hir_path(db: &impl HirDatabase, resolver: &Resolver, path: &Path) -> Self { |
68 | if let Some(name) = path.as_ident() { | ||
69 | // TODO: remove this | ||
70 | if let Some(int_ty) = primitive::IntTy::from_type_name(name) { | ||
71 | return Ty::simple(TypeCtor::Int(primitive::UncertainIntTy::Known(int_ty))); | ||
72 | } else if let Some(float_ty) = primitive::FloatTy::from_type_name(name) { | ||
73 | return Ty::simple(TypeCtor::Float(primitive::UncertainFloatTy::Known(float_ty))); | ||
74 | } else if let Some(known) = name.as_known_name() { | ||
75 | match known { | ||
76 | KnownName::Bool => return Ty::simple(TypeCtor::Bool), | ||
77 | KnownName::Char => return Ty::simple(TypeCtor::Char), | ||
78 | KnownName::Str => return Ty::simple(TypeCtor::Str), | ||
79 | _ => {} | ||
80 | } | ||
81 | } | ||
82 | } | ||
83 | |||
84 | // Resolve the path (in type namespace) | 68 | // Resolve the path (in type namespace) |
85 | let resolution = resolver.resolve_path(db, path).take_types(); | 69 | let resolution = resolver.resolve_path(db, path).take_types(); |
86 | 70 | ||