Extend `minicore` with intrinsics and use it to replace `#[rustc_intrinsic]` in tests
@rptr is already working on this.
Since May 21, 2025.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
We now have a "minicore" at tests/auxiliary/minicore.rs with some lang items to be shared among no_core tests. However, there's a lot more that could reasonably be added there, and this does not require a lot of experience with how rustc works so it could be a good first issue as well.
To find a candidate test, grep the test suite for #[rustc_intrinsic]. If this test also uses #![no_core], changes are high that this is a good candidate. If the test does not yet use minicore, first port it to minicore by adding //@ add-core-stubs and:
extern crate minicore;
use minicore::*;
See e.g. tests/assembly/simd-intrinsic-mask-reduce.rs for an example.
All of the existing lang items (things with #[lang] attributes) in the test should be removed now; if they don't yet exist in minicore, they should be added there. Then also remove the #[rustc_intrinsic] declarations from the test and add them to minicore if they do not yet exist there.
Cc @jieyouxu
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.