From 4c43631829d8bac8b7533c994d8cf1241a95ce70 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 26 Nov 2019 14:35:23 +0300 Subject: Introduce hir_ty --- crates/ra_hir/src/ty/lower.rs | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) (limited to 'crates/ra_hir/src/ty/lower.rs') diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs index 485871e69..2d23890a5 100644 --- a/crates/ra_hir/src/ty/lower.rs +++ b/crates/ra_hir/src/ty/lower.rs @@ -9,7 +9,7 @@ use std::iter; use std::sync::Arc; use hir_def::{ - builtin_type::{BuiltinFloat, BuiltinInt, BuiltinType}, + builtin_type::BuiltinType, generics::WherePredicate, path::{GenericArg, PathSegment}, resolver::{HasResolver, Resolver, TypeNs}, @@ -27,7 +27,7 @@ use super::{ use crate::{ db::HirDatabase, ty::{ - primitive::{FloatTy, IntTy, Uncertain}, + primitive::{FloatTy, IntTy}, Adt, }, util::make_mut_slice, @@ -679,36 +679,6 @@ fn type_for_builtin(def: BuiltinType) -> Ty { }) } -impl From for IntTy { - fn from(t: BuiltinInt) -> Self { - IntTy { signedness: t.signedness, bitness: t.bitness } - } -} - -impl From for FloatTy { - fn from(t: BuiltinFloat) -> Self { - FloatTy { bitness: t.bitness } - } -} - -impl From> for Uncertain { - fn from(t: Option) -> Self { - match t { - None => Uncertain::Unknown, - Some(t) => Uncertain::Known(t.into()), - } - } -} - -impl From> for Uncertain { - fn from(t: Option) -> Self { - match t { - None => Uncertain::Unknown, - Some(t) => Uncertain::Known(t.into()), - } - } -} - fn fn_sig_for_struct_constructor(db: &impl HirDatabase, def: StructId) -> FnSig { let struct_data = db.struct_data(def.into()); let fields = struct_data.variant_data.fields(); -- cgit v1.2.3