From d09e5a3d9e57c631860ef195fad29f002569ae4d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 12 Nov 2019 15:09:25 +0300 Subject: Move definition of exprs to hir_def --- crates/ra_hir/src/ty/primitive.rs | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'crates/ra_hir/src/ty/primitive.rs') diff --git a/crates/ra_hir/src/ty/primitive.rs b/crates/ra_hir/src/ty/primitive.rs index 1749752f1..7362de4c3 100644 --- a/crates/ra_hir/src/ty/primitive.rs +++ b/crates/ra_hir/src/ty/primitive.rs @@ -129,24 +129,6 @@ impl IntTy { (Signedness::Unsigned, IntBitness::X128) => "u128", } } - - pub(crate) fn from_suffix(suffix: &str) -> Option { - match suffix { - "isize" => Some(IntTy::isize()), - "i8" => Some(IntTy::i8()), - "i16" => Some(IntTy::i16()), - "i32" => Some(IntTy::i32()), - "i64" => Some(IntTy::i64()), - "i128" => Some(IntTy::i128()), - "usize" => Some(IntTy::usize()), - "u8" => Some(IntTy::u8()), - "u16" => Some(IntTy::u16()), - "u32" => Some(IntTy::u32()), - "u64" => Some(IntTy::u64()), - "u128" => Some(IntTy::u128()), - _ => None, - } - } } #[derive(Copy, Clone, PartialEq, Eq, Hash)] @@ -181,12 +163,4 @@ impl FloatTy { FloatBitness::X64 => "f64", } } - - pub(crate) fn from_suffix(suffix: &str) -> Option { - match suffix { - "f32" => Some(FloatTy::f32()), - "f64" => Some(FloatTy::f64()), - _ => None, - } - } } -- cgit v1.2.3