Document RISC-V d, e, and f extensions#2274
Merged
Merged
Conversation
These are being stabilized in rust-lang/rust#156188 as cfg-only features. It is a little odd to list them here in the target_feature attribute section since they can't be used with the attribute, but I think it makes sense to keep things together. Perhaps in the future we may consider breaking these lists out into a separate section and rearrange things.
Contributor
Author
|
@romancardenas can you review and confirm everything looks right here? In particular, I was uncertain about the E feature, since it has a slightly different way of being documented in the manual. Also, I noticed that we are linking to the 20250508 tag, which is a bit old now. Would it make sense to change the links to a newer version? I've noticed these features have had some updates. I think the latest ratified version is v20260120. |
romancardenas
approved these changes
May 24, 2026
traviscross
approved these changes
May 26, 2026
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jun 7, 2026
…-cfg-stable-toggle-unstable, r=RalfJung riscv: promote d, e, and f target_features to CfgStableToggleUnstable Reference PR: - rust-lang/reference#2274 This PR is a continuation of rust-lang#155962 It uses the new `CfgStableToggleUnstable` stability level for the `"d"`, `"e"`, and `"f"` `target_features` of RISC-V. This way, it will be possible to add conditional code blocks depending on whether the target architecture has FPU, for instance. The PR is related to rust-lang#150257 r? @RalfJung
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jun 7, 2026
…-cfg-stable-toggle-unstable, r=RalfJung riscv: promote d, e, and f target_features to CfgStableToggleUnstable Reference PR: - rust-lang/reference#2274 This PR is a continuation of rust-lang#155962 It uses the new `CfgStableToggleUnstable` stability level for the `"d"`, `"e"`, and `"f"` `target_features` of RISC-V. This way, it will be possible to add conditional code blocks depending on whether the target architecture has FPU, for instance. The PR is related to rust-lang#150257 r? @RalfJung
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jun 7, 2026
…-cfg-stable-toggle-unstable, r=RalfJung riscv: promote d, e, and f target_features to CfgStableToggleUnstable Reference PR: - rust-lang/reference#2274 This PR is a continuation of rust-lang#155962 It uses the new `CfgStableToggleUnstable` stability level for the `"d"`, `"e"`, and `"f"` `target_features` of RISC-V. This way, it will be possible to add conditional code blocks depending on whether the target architecture has FPU, for instance. The PR is related to rust-lang#150257 r? @RalfJung
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jun 7, 2026
…-cfg-stable-toggle-unstable, r=RalfJung riscv: promote d, e, and f target_features to CfgStableToggleUnstable Reference PR: - rust-lang/reference#2274 This PR is a continuation of rust-lang#155962 It uses the new `CfgStableToggleUnstable` stability level for the `"d"`, `"e"`, and `"f"` `target_features` of RISC-V. This way, it will be possible to add conditional code blocks depending on whether the target architecture has FPU, for instance. The PR is related to rust-lang#150257 r? @RalfJung
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jun 7, 2026
…-cfg-stable-toggle-unstable, r=RalfJung riscv: promote d, e, and f target_features to CfgStableToggleUnstable Reference PR: - rust-lang/reference#2274 This PR is a continuation of rust-lang#155962 It uses the new `CfgStableToggleUnstable` stability level for the `"d"`, `"e"`, and `"f"` `target_features` of RISC-V. This way, it will be possible to add conditional code blocks depending on whether the target architecture has FPU, for instance. The PR is related to rust-lang#150257 r? @RalfJung
rust-timer
added a commit
to rust-lang/rust
that referenced
this pull request
Jun 8, 2026
Rollup merge of #156188 - romancardenas:riscv-target-feature-cfg-stable-toggle-unstable, r=RalfJung riscv: promote d, e, and f target_features to CfgStableToggleUnstable Reference PR: - rust-lang/reference#2274 This PR is a continuation of #155962 It uses the new `CfgStableToggleUnstable` stability level for the `"d"`, `"e"`, and `"f"` `target_features` of RISC-V. This way, it will be possible to add conditional code blocks depending on whether the target architecture has FPU, for instance. The PR is related to #150257 r? @RalfJung
github-actions Bot
pushed a commit
to rust-lang/stdarch
that referenced
this pull request
Jun 8, 2026
…le-toggle-unstable, r=RalfJung riscv: promote d, e, and f target_features to CfgStableToggleUnstable Reference PR: - rust-lang/reference#2274 This PR is a continuation of rust-lang/rust#155962 It uses the new `CfgStableToggleUnstable` stability level for the `"d"`, `"e"`, and `"f"` `target_features` of RISC-V. This way, it will be possible to add conditional code blocks depending on whether the target architecture has FPU, for instance. The PR is related to rust-lang/rust#150257 r? @RalfJung
asukaminato0721
pushed a commit
to asukaminato0721/rust-analyzer
that referenced
this pull request
Jun 8, 2026
…le-toggle-unstable, r=RalfJung riscv: promote d, e, and f target_features to CfgStableToggleUnstable Reference PR: - rust-lang/reference#2274 This PR is a continuation of rust-lang/rust#155962 It uses the new `CfgStableToggleUnstable` stability level for the `"d"`, `"e"`, and `"f"` `target_features` of RISC-V. This way, it will be possible to add conditional code blocks depending on whether the target architecture has FPU, for instance. The PR is related to rust-lang/rust#150257 r? @RalfJung
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are being stabilized in rust-lang/rust#156188 as cfg-only features. It is a little odd to list them here in the target_feature attribute section since they can't be used with the attribute, but I think it makes sense to keep things together. Perhaps in the future we may consider breaking these lists out into a separate section and rearrange things.