]> git.lizzy.rs Git - rust.git/commitdiff
minor: Update list of safe intrinsics
authorLukas Wirth <lukastw97@gmail.com>
Fri, 3 Dec 2021 23:51:50 +0000 (00:51 +0100)
committerLukas Wirth <lukastw97@gmail.com>
Fri, 3 Dec 2021 23:51:50 +0000 (00:51 +0100)
crates/hir_def/src/item_tree/lower.rs
crates/hir_expand/src/name.rs

index bb224f57b23354334bd9eee84e2c2cde0d5f26fc..32213aac3901fbf6a51a90c958e11b1e7bd5e3df 100644 (file)
@@ -694,11 +694,11 @@ enum GenericsOwner<'a> {
 
 /// Returns `true` if the given intrinsic is unsafe to call, or false otherwise.
 fn is_intrinsic_fn_unsafe(name: &Name) -> bool {
-    // Should be kept in sync with https://github.com/rust-lang/rust/blob/0cd0709f19d316c4796fa71c5f52c8612a5f3771/compiler/rustc_typeck/src/check/intrinsic.rs#L72-L105
+    // Should be kept in sync with https://github.com/rust-lang/rust/blob/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/compiler/rustc_typeck/src/check/intrinsic.rs#L72-L106
     ![
-        known::abort,
         known::add_with_overflow,
         known::bitreverse,
+        known::black_box,
         known::bswap,
         known::caller_location,
         known::ctlz,
index 95d272ba682db02917ca92e11e9fda4605c3e85d..ab730b54bc3c54996c9797ec932b20aa09e7cb6e 100644 (file)
@@ -272,6 +272,7 @@ macro_rules! known_names {
         // Safe intrinsics
         abort,
         add_with_overflow,
+        black_box,
         bitreverse,
         bswap,
         caller_location,