-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Extend minicore
with intrinsics and use it to replace #[rustc_intrinsic]
in tests
#139918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
A-lang-item
Area: Language items
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
After applying the change to this test https://github.com/rust-lang/rust/blob/master/tests/assembly/rust-abi-arg-attr.rs error[E0425]: cannot find function `three_way_compare` in this scope
--> /home/hbina085/git/rustlang/tests/assembly/rust-abi-arg-attr.rs:24:15
|
24 | match three_way_compare($a, $b) {
| ^^^^^^^^^^^^^^^^^ not found in this scope
...
68 | max!(a, b)
| ---------- in this macro invocation
|
= note: this error originates in the macro `max` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared type `Ordering`
--> /home/hbina085/git/rustlang/tests/assembly/rust-abi-arg-attr.rs:25:13
|
25 | Ordering::Less | Ordering::Equal => $b,
| ^^^^^^^^ use of undeclared type `Ordering`
...
48 | max!(a, b)
| ---------- in this macro invocation
|
= note: this error originates in the macro `max` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared type `Ordering`
--> /home/hbina085/git/rustlang/tests/assembly/rust-abi-arg-attr.rs:25:30
|
25 | Ordering::Less | Ordering::Equal => $b,
| ^^^^^^^^ use of undeclared type `Ordering`
...
48 | max!(a, b)
| ---------- in this macro invocation
|
= note: this error originates in the macro `max` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared type `Ordering`
--> /home/hbina085/git/rustlang/tests/assembly/rust-abi-arg-attr.rs:26:13
|
26 | Ordering::Greater => $a,
| ^^^^^^^^ use of undeclared type `Ordering`
...
48 | max!(a, b)
| ---------- in this macro invocation
|
= note: this error originates in the macro `max` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared type `Ordering`
--> /home/hbina085/git/rustlang/tests/assembly/rust-abi-arg-attr.rs:25:13
|
25 | Ordering::Less | Ordering::Equal => $b,
| ^^^^^^^^ use of undeclared type `Ordering`
...
68 | max!(a, b)
| ---------- in this macro invocation
|
= note: this error originates in the macro `max` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared type `Ordering`
--> /home/hbina085/git/rustlang/tests/assembly/rust-abi-arg-attr.rs:25:30
|
25 | Ordering::Less | Ordering::Equal => $b,
| ^^^^^^^^ use of undeclared type `Ordering`
...
68 | max!(a, b)
| ---------- in this macro invocation
|
= note: this error originates in the macro `max` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared type `Ordering`
--> /home/hbina085/git/rustlang/tests/assembly/rust-abi-arg-attr.rs:26:13
|
26 | Ordering::Greater => $a,
| ^^^^^^^^ use of undeclared type `Ordering`
...
68 | max!(a, b)
| ---------- in this macro invocation
|
= note: this error originates in the macro `max` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 8 previous errors; 1 warning emitted It doesn't look like minicore have
|
This is the list of files if anyone is interested hbina085@DESKTOP-PGERPVO ~/g/rustlang (master) [127]> rg --context 10000000 '\#\[rustc_intrinsic\]' /home/hbina085/git/rustlang/tests/**.rs | rg '\#!\[no_core\]' (base)
/home/hbina085/git/rustlang/tests/ui/traits/const-traits/auxiliary/minicore.rs-#![no_core]
/home/hbina085/git/rustlang/tests/ui/target-feature/feature-hierarchy.rs-#![no_core]
/home/hbina085/git/rustlang/tests/ui/target-feature/no-llvm-leaks.rs-#![no_core]
/home/hbina085/git/rustlang/tests/ui/repr/16-bit-repr-c-enum.rs-#![no_core]
/home/hbina085/git/rustlang/tests/rustdoc/safe-intrinsic.rs-#![no_core]
/home/hbina085/git/rustlang/tests/run-make/avr-rjmp-offset/avr-rjmp-offsets.rs-//! This test case is a `#![no_core]`-version of the MVCE presented in #129301.
/home/hbina085/git/rustlang/tests/run-make/avr-rjmp-offset/avr-rjmp-offsets.rs-#![no_core]
/home/hbina085/git/rustlang/tests/run-make/atomic-lock-free/atomic_lock_free.rs-#![no_core]
/home/hbina085/git/rustlang/tests/assembly/simd-intrinsic-mask-load.rs-#![no_core]
/home/hbina085/git/rustlang/tests/codegen/emscripten-catch-unwind-js-eh.rs-#![no_core]
/home/hbina085/git/rustlang/tests/codegen/avr/avr-func-addrspace.rs-#![no_core]
/home/hbina085/git/rustlang/tests/auxiliary/minicore.rs-#![no_core]
/home/hbina085/git/rustlang/tests/assembly/simd-intrinsic-mask-reduce.rs-#![no_core]
/home/hbina085/git/rustlang/tests/assembly/simd-intrinsic-scatter.rs-#![no_core]
/home/hbina085/git/rustlang/tests/assembly/simd-bitmask.rs-#![no_core]
/home/hbina085/git/rustlang/tests/codegen/intrinsics/nontemporal.rs-#![no_core]
/home/hbina085/git/rustlang/tests/assembly/simd-intrinsic-select.rs-#![no_core]
/home/hbina085/git/rustlang/tests/assembly/simd-intrinsic-gather.rs-#![no_core]
/home/hbina085/git/rustlang/tests/assembly/simd-intrinsic-mask-store.rs-#![no_core]
/home/hbina085/git/rustlang/tests/codegen/emscripten-catch-unwind-wasm-eh.rs-#![no_core] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-lang-item
Area: Language items
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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: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
The text was updated successfully, but these errors were encountered: