aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand/src/name.rs
diff options
context:
space:
mode:
authorFrancesco Zardi <[email protected]>2020-10-21 08:06:05 +0100
committerFrancesco Zardi <[email protected]>2020-10-21 08:06:05 +0100
commita9d996a7c5f962b4ac914c86f5005eb22128f511 (patch)
treeb56e177229758fbaa269388a6b64ff53b933e25d /crates/hir_expand/src/name.rs
parent2c5bd9517e202a6e2b004664f291b85093c8e0a9 (diff)
Add whitelist of safe intrinsics
Diffstat (limited to 'crates/hir_expand/src/name.rs')
-rw-r--r--crates/hir_expand/src/name.rs36
1 files changed, 36 insertions, 0 deletions
diff --git a/crates/hir_expand/src/name.rs b/crates/hir_expand/src/name.rs
index 63f828707..0d5b56681 100644
--- a/crates/hir_expand/src/name.rs
+++ b/crates/hir_expand/src/name.rs
@@ -208,6 +208,42 @@ pub mod known {
208 PartialOrd, 208 PartialOrd,
209 Eq, 209 Eq,
210 PartialEq, 210 PartialEq,
211 // Safe primitives
212 abort,
213 size_of,
214 min_align_of,
215 needs_drop,
216 caller_location,
217 size_of_val,
218 min_align_of_val,
219 add_with_overflow,
220 sub_with_overflow,
221 mul_with_overflow,
222 wrapping_add,
223 wrapping_sub,
224 wrapping_mul,
225 saturating_add,
226 saturating_sub,
227 rotate_left,
228 rotate_right,
229 ctpop,
230 ctlz,
231 cttz,
232 bswap,
233 bitreverse,
234 discriminant_value,
235 type_id,
236 likely,
237 unlikely,
238 ptr_guaranteed_eq,
239 ptr_guaranteed_ne,
240 minnumf32,
241 minnumf64,
242 maxnumf32,
243 rustc_peek,
244 maxnumf64,
245 type_name,
246 variant_count,
211 ); 247 );
212 248
213 // self/Self cannot be used as an identifier 249 // self/Self cannot be used as an identifier