10921: minor: Update list of safe intrinsics r=Veykril a=Veykril

Closes https://github.com/rust-analyzer/rust-analyzer/issues/4798
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
bors[bot] 2021-12-03 23:52:28 +00:00 committed by GitHub
commit 5c00c3e8d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -694,11 +694,11 @@ enum GenericsOwner<'a> {
/// Returns `true` if the given intrinsic is unsafe to call, or false otherwise. /// Returns `true` if the given intrinsic is unsafe to call, or false otherwise.
fn is_intrinsic_fn_unsafe(name: &Name) -> bool { 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::add_with_overflow,
known::bitreverse, known::bitreverse,
known::black_box,
known::bswap, known::bswap,
known::caller_location, known::caller_location,
known::ctlz, known::ctlz,

View file

@ -272,6 +272,7 @@ pub mod known {
// Safe intrinsics // Safe intrinsics
abort, abort,
add_with_overflow, add_with_overflow,
black_box,
bitreverse, bitreverse,
bswap, bswap,
caller_location, caller_location,