Skip to content
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

ports the compiler test cases to new rust_intrinsic format #138364

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BLANKatGITHUB
Copy link
Contributor

pr is part of #132735

@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2025

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 11, 2025
@rustbot

This comment has been minimized.

@BLANKatGITHUB
Copy link
Contributor Author

@RalfJung I ran test rustc_error_codes and the test passed on my local machine.

@RalfJung
Copy link
Member

RalfJung commented Mar 11, 2025

First of all, please pick a PR title and description that actually says something about what the PR does. :)

@BLANKatGITHUB BLANKatGITHUB marked this pull request as draft March 11, 2025 17:51
@BLANKatGITHUB BLANKatGITHUB changed the title Compiler ports the compiler test cases to new rust_intrinsic format Mar 11, 2025
@rust-log-analyzer

This comment has been minimized.

@BLANKatGITHUB
Copy link
Contributor Author

Should we bless the test?

@RalfJung
Copy link
Member

You'll need to provide a definition for the static, as the error says.

fn simd_add<T>(a: T, b: T) -> T;
}
#[rustc_intrinsic]
unsafe fn simd_add<T>(_a: T, _b: T) -> T;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the leading _ again (everywhere in this PR)

@RalfJung RalfJung removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 12, 2025
@BLANKatGITHUB BLANKatGITHUB marked this pull request as ready for review March 12, 2025 11:27
@rustbot rustbot removed has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 12, 2025
@rust-log-analyzer

This comment has been minimized.

// error: intrinsic must be a function
}
#[rustc_intrinsic]
pub static atomic_singlethreadfence_seqcst: fn() = || {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub static atomic_singlethreadfence_seqcst: fn() = || {};
#[allow(non_upper_case_globals)]
pub static atomic_singlethreadfence_seqcst: fn() = || {};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the problem is pub static atomic_singlethreadfence_seqcst: fn() = || {}; as the atomic_singlethreadfence_seqcst being declared as a static fn declared as an empty closer making the test cases pass which should have been failed .

It should be pub static atomic_singlethreadfence_seqcst: fn() ; but it gives the error "provide a definition for the static" instead of the expected one

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems there is a bug somewhere, and we are not complaining when #[rustc_intrinsic] is used on a non-function (and then likely being ignored).

@oli-obk is that deliberate? Any suggestion for what to do with this old test?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a rustc attribute, it's fine to just not work on things and/or ICE. ICEing is better, but there is no requirement for it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay so the error code E0622 should just be removed then when we remove the ABI.

@BLANKatGITHUB just leave E0622.md unchanged in this PR.

@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member

@rustbot author
There are still CI failures.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 13, 2025
Update compiler/rustc_error_codes/src/error_codes/E0622.md

Co-authored-by: Ralf Jung <post@ralfj.de>

reverted chages on E0622.md

updated E0622.md
@RalfJung
Copy link
Member

Thanks, LGTM!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 18, 2025

📌 Commit a3669b8 has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Mar 18, 2025

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 18, 2025
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Mar 20, 2025
ports the compiler test cases to new rust_intrinsic format

pr is part of rust-lang#132735
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 20, 2025
Rollup of 15 pull requests

Successful merges:

 - rust-lang#138321 ([bootstrap] Distribute split debuginfo if present)
 - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format)
 - rust-lang#138410 (Couple mir building cleanups)
 - rust-lang#138435 (Add support for postfix yield expressions)
 - rust-lang#138536 (stable_mir: Add `MutMirVisitor`)
 - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt)
 - rust-lang#138650 (Optimize `io::Write::write_fmt` for constant strings)
 - rust-lang#138652 (Reintroduce remote-test support in run-make tests)
 - rust-lang#138685 (Use `Option<Ident>` for lowered param names.)
 - rust-lang#138694 (Fix: add ohos target notes)
 - rust-lang#138700 (Suggest `-Whelp` when pass `--print lints` to rustc)
 - rust-lang#138709 (Update GCC submodule)
 - rust-lang#138724 (Check attrs: Don't try to retrieve the name of list stems)
 - rust-lang#138731 (coverage: Add LLVM plumbing for expansion regions)
 - rust-lang#138732 (Use `def_path_str` for def id arg in `UnsupportedOpInfo`)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 21, 2025
ports the compiler test cases to new rust_intrinsic format

pr is part of rust-lang#132735
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format)
 - rust-lang#138570 (add `naked_functions_target_feature` unstable feature)
 - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt)
 - rust-lang#138627 (Autodiff cleanups)
 - rust-lang#138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled)
 - rust-lang#138706 (Improve bootstrap git modified path handling)
 - rust-lang#138709 (Update GCC submodule)
 - rust-lang#138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it)
 - rust-lang#138721 (Use explicit cpu in some asm and codegen tests.)
 - rust-lang#138728 (Update `compiler-builtins` to 0.1.152)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format)
 - rust-lang#138570 (add `naked_functions_target_feature` unstable feature)
 - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt)
 - rust-lang#138627 (Autodiff cleanups)
 - rust-lang#138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled)
 - rust-lang#138706 (Improve bootstrap git modified path handling)
 - rust-lang#138709 (Update GCC submodule)
 - rust-lang#138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it)
 - rust-lang#138721 (Use explicit cpu in some asm and codegen tests.)
 - rust-lang#138728 (Update `compiler-builtins` to 0.1.152)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 21, 2025
ports the compiler test cases to new rust_intrinsic format

pr is part of rust-lang#132735
Kobzol added a commit to Kobzol/rust that referenced this pull request Mar 21, 2025
ports the compiler test cases to new rust_intrinsic format

pr is part of rust-lang#132735
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2025
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format)
 - rust-lang#138570 (add `naked_functions_target_feature` unstable feature)
 - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt)
 - rust-lang#138627 (Autodiff cleanups)
 - rust-lang#138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled)
 - rust-lang#138706 (Improve bootstrap git modified path handling)
 - rust-lang#138709 (Update GCC submodule)
 - rust-lang#138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it)
 - rust-lang#138721 (Use explicit cpu in some asm and codegen tests.)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants