Closed
Description
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.
- Port the remaining
extern "rust-intrinsic"
intrinsics inlibrary
to 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) - Port the uses of
extern "rust-intrinsic"
insrc/tools/miri
andtests/ui/simd
to 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. - Similarly port the
extern "rust-intrinsic"
in this file (note that this is a separate repository) - Remove support for
extern "rust-intrinsic"
blocks from the compiler -- in particular, remove this. A bunch of tests will still need updating; you can grep forrust-intrinsic
to find them all. They should all be ported to the new style, similar to the PR in step 2. - Determine whether there is more cleanup that can be done. For instance, this can be removed. Maybe we can get rid of
Abi::RustIntrinsic
entirely?
Metadata
Metadata
Assignees
Labels
Category: PRs that clean code up or issues documenting cleanup.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.