aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/primitive.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/primitive.rs')
-rw-r--r--crates/ra_hir/src/ty/primitive.rs26
1 files changed, 0 insertions, 26 deletions
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 {
129 (Signedness::Unsigned, IntBitness::X128) => "u128", 129 (Signedness::Unsigned, IntBitness::X128) => "u128",
130 } 130 }
131 } 131 }
132
133 pub(crate) fn from_suffix(suffix: &str) -> Option<IntTy> {
134 match suffix {
135 "isize" => Some(IntTy::isize()),
136 "i8" => Some(IntTy::i8()),
137 "i16" => Some(IntTy::i16()),
138 "i32" => Some(IntTy::i32()),
139 "i64" => Some(IntTy::i64()),
140 "i128" => Some(IntTy::i128()),
141 "usize" => Some(IntTy::usize()),
142 "u8" => Some(IntTy::u8()),
143 "u16" => Some(IntTy::u16()),
144 "u32" => Some(IntTy::u32()),
145 "u64" => Some(IntTy::u64()),
146 "u128" => Some(IntTy::u128()),
147 _ => None,
148 }
149 }
150} 132}
151 133
152#[derive(Copy, Clone, PartialEq, Eq, Hash)] 134#[derive(Copy, Clone, PartialEq, Eq, Hash)]
@@ -181,12 +163,4 @@ impl FloatTy {
181 FloatBitness::X64 => "f64", 163 FloatBitness::X64 => "f64",
182 } 164 }
183 } 165 }
184
185 pub(crate) fn from_suffix(suffix: &str) -> Option<FloatTy> {
186 match suffix {
187 "f32" => Some(FloatTy::f32()),
188 "f64" => Some(FloatTy::f64()),
189 _ => None,
190 }
191 }
192} 166}