aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/primitive.rs
diff options
context:
space:
mode:
authorSeivan Heidari <[email protected]>2019-11-12 18:04:54 +0000
committerSeivan Heidari <[email protected]>2019-11-12 18:04:54 +0000
commit0525778a3ad590492b51cc11085d815f9bb8f92b (patch)
tree56096932b19861ab86c9564717f88cf7cd86d023 /crates/ra_hir/src/ty/primitive.rs
parent11755f3eff87cd8ee0af7961377e0ae3ffea5050 (diff)
parent3322d65addd9ec61b8c5bc055803f6549946da8b (diff)
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
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}