diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-12 12:41:55 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-12 12:41:55 +0000 |
commit | 6149ee30ef9a379f642c8a645cea13f32c4f3d84 (patch) | |
tree | 5e62cbb2356383b36a36ae717a99f628580da60c /crates/ra_hir/src/ty/primitive.rs | |
parent | f5e1b0f97c9e46b5186f99d744f4587b2aee397e (diff) | |
parent | 30bf7e43db2667470875ea4477a95aa297896851 (diff) |
Merge #2221
2221: Disallow regressing crate docs r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/primitive.rs')
-rw-r--r-- | crates/ra_hir/src/ty/primitive.rs | 26 |
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 | } |