We currently have two ways to declare symbols that are invoked as intrinsics. The old way:
extern "rust-intrinsic" {
fn unreachable() -> !;
}
The new way:
#[rustc_intrinsic]
unsafe fn unreachable() -> !;
The goal of this issue is to remove support for the old style, and consistently use the new style.
We currently have two ways to declare symbols that are invoked as intrinsics. The old way:
The new way:
The goal of this issue is to remove support for the old style, and consistently use the new style.
extern "rust-intrinsic"intrinsics inlibraryto the new style, updating them using the pattern described above. This can be a PR on its own. (Implemented in Change intrinsic declarations to new style #132907, changes old intrinsic declaration to new declaration #133106, ports last few library files to new intrinsic style #136005)extern "rust-intrinsic"insrc/tools/miriandtests/ui/simdto the new style.This is implemented in Partial progress on #132735: Replace extern "rust-intrinsic" with #[rustc_intrinsic] across the codebase #135333, Port ui/simd tests to use the intrinsic macro #136022.
extern "rust-intrinsic"in this file (note that this is a separate repository)extern "rust-intrinsic"blocks from the compiler -- in particular, remove this. A bunch of tests will still need updating; you can grep forrust-intrinsicto find them all. They should all be ported to the new style, similar to the PR in step 2.Abi::RustIntrinsicentirely?