Skip to content

Add an experimental unsafe(force_target_feature) attribute. #145573

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

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

Conversation

veluca93
Copy link
Contributor

@veluca93 veluca93 commented Aug 18, 2025

This uses the feature gate for #143352, but is described in rust-lang/rfcs#3820 which is strongly tied to the experiment.

@rustbot
Copy link
Collaborator

rustbot commented Aug 18, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
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 A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 18, 2025

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

@davidtwco
Copy link
Member

r=me once CI passes

@rust-log-analyzer

This comment has been minimized.

@veluca93 veluca93 force-pushed the unsafe-force-target-feature branch 2 times, most recently from 14aad5b to 07b5231 Compare August 18, 2025 16:03
@WaffleLapkin
Copy link
Member

@bors r=davidtwco

@bors
Copy link
Collaborator

bors commented Aug 18, 2025

📌 Commit 07b5231 has been approved by davidtwco

It is now in the queue for this repository.

@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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 18, 2025
bors added a commit that referenced this pull request Aug 19, 2025
Rollup of 19 pull requests

Successful merges:

 - #140956 (`impl PartialEq<{str,String}> for {Path,PathBuf}`)
 - #141744 (Stabilize `ip_from`)
 - #142681 (Remove the `#[no_sanitize]` attribute in favor of `#[sanitize(xyz = "on|off")]`)
 - #142871 (Trivial improve doc for transpose )
 - #144252 (Do not copy .rmeta files into the sysroot of the build compiler during check of rustc/std)
 - #144476 (rustdoc-search: search backend with partitioned suffix tree)
 - #144567 (Fix RISC-V Test Failures in ./x test for Multiple Codegen Cases)
 - #144804 (Don't warn on never to any `as` casts as unreachable)
 - #144960 ([RTE-513] Ignore sleep_until test on SGX)
 - #145013 (overhaul `&mut` suggestions in borrowck errors)
 - #145041 (rework GAT borrowck limitation error)
 - #145243 (take attr style into account in diagnostics)
 - #145405 (cleanup: use run_in_tmpdir in run-make/rustdoc-scrape-examples-paths)
 - #145432 (cg_llvm: Small cleanups to `owned_target_machine`)
 - #145484 (Remove `LlvmArchiveBuilder` and supporting code/bindings)
 - #145557 (Fix uplifting in `Assemble` step)
 - #145563 (Remove the `From` derive macro from prelude)
 - #145565 (Improve context of bootstrap errors in CI)
 - #145584 (interpret: avoid forcing all integer newtypes into memory during clear_provenance)

Failed merges:

 - #145359 (Fix bug where `rustdoc-js` tester would not pick the right `search.js` file if there is more than one)
 - #145573 (Add an experimental unsafe(force_target_feature) attribute.)

r? `@ghost`
`@rustbot` modify labels: rollup
@Zalathar
Copy link
Contributor

Bors hasn't noticed that this now has conflicts.

@bors r-
@rustbot author

@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 Aug 19, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 19, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 19, 2025
@veluca93 veluca93 force-pushed the unsafe-force-target-feature branch from 07b5231 to 76ba208 Compare August 19, 2025 10:30
@rustbot

This comment has been minimized.

@veluca93
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 19, 2025
@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 20, 2025

📌 Commit 76ba208 has been approved by davidtwco

It is now in the queue for this repository.

@veluca93 veluca93 force-pushed the unsafe-force-target-feature branch from 76ba208 to d4c42e6 Compare August 20, 2025 21:28
@rustbot

This comment has been minimized.

@veluca93
Copy link
Contributor Author

@bors r- #145680 (comment)

looks like this just needs to re-bless the tests

Done! (why was this not caught by the CI?)

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 21, 2025

📌 Commit d4c42e6 has been approved by davidtwco

It is now in the queue for this repository.

@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 Aug 21, 2025
@veluca93 veluca93 force-pushed the unsafe-force-target-feature branch from d4c42e6 to 9fae493 Compare August 21, 2025 09:36
@davidtwco
Copy link
Member

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 21, 2025
@davidtwco
Copy link
Member

@bors delegate+

Feel free to r=me once CI passes

@bors
Copy link
Collaborator

bors commented Aug 21, 2025

✌️ @veluca93, you can now approve this pull request!

If @davidtwco told you to "r=me" after making some further change, please make that change, then do @bors r=@davidtwco

@veluca93
Copy link
Contributor Author

@bors r=@davidtwco

@bors
Copy link
Collaborator

bors commented Aug 21, 2025

📌 Commit 9fae493 has been approved by davidtwco

It is now in the queue for this repository.

@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 Aug 21, 2025
@bors
Copy link
Collaborator

bors commented Aug 21, 2025

☔ The latest upstream changes (presumably #145647) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 21, 2025
@veluca93 veluca93 force-pushed the unsafe-force-target-feature branch from 9fae493 to a8bfaf6 Compare August 21, 2025 22:41
@rustbot
Copy link
Collaborator

rustbot commented Aug 21, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

This uses the feature gate for
rust-lang#143352, but is described in
rust-lang/rfcs#3820 which is strongly tied to
the experiment.
@veluca93 veluca93 force-pushed the unsafe-force-target-feature branch from a8bfaf6 to 291da71 Compare August 21, 2025 23:29
@veluca93
Copy link
Contributor Author

@bors r=@davidtwco

@bors
Copy link
Collaborator

bors commented Aug 22, 2025

📌 Commit 291da71 has been approved by davidtwco

It is now in the queue for this repository.

@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 Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants