Repository navigation
Conversation
Collaborator
|
Some changes occurred in cc @Amanieu, @folkertdev, @sayantn |
Member
Author
|
@bors try jobs=test-i686-gnu-1,test-i686-gnu-2 |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 27, 2026
std: Clean up and improve errors for `is_*_feature_detected` macros try-job: test-i686-gnu-1 try-job: test-i686-gnu-2
2 tasks
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
tgross35
force-pushed
the
std_detect-updates
branch
from
October 27, 2026 02:35
8dd794c to
d4b8215
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 27, 2026
std: Clean up and improve errors for `is_*_feature_detected` macros try-job: test-i686-gnu-1
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
tgross35
force-pushed
the
std_detect-updates
branch
from
October 27, 2026 04:57
d4b8215 to
97f8d9c
Compare
This comment has been minimized.
This comment has been minimized.
tgross35
force-pushed
the
std_detect-updates
branch
from
October 27, 2026 05:49
97f8d9c to
d9777f8
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 27, 2026
std: Clean up and improve errors for `is_*_feature_detected` macros try-job: test-i686-gnu-1
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
tgross35
force-pushed
the
std_detect-updates
branch
from
October 27, 2026 08:17
d9777f8 to
84f7df7
Compare
This comment has been minimized.
This comment has been minimized.
It can be a bit tricky to follow these macros, but we still want to provide good diagnostics. Add tests making sure these don't change.
Because of rewrapping, this prints as:
error: This macro cannot be used on the current target.
You can prevent it from being used in other architectures by
guarding it behind a cfg(any(target_arch = "aarch64", target_arch = "arm64ec")).
Bridge newlines so it instead prints as this:
error: This macro cannot be used on the current target. You can prevent
it from being used in other architectures by guarding it behind
a `cfg(any(target_arch = "aarch64", target_arch = "arm64ec"))`.
We have a handful of `#[unstable]` gates that aren't even being used, because all that matters is the re-export in `std`. For example, the RISC-V macro appears unstable, but has actually been stable since 1.78 <https://doc.rust-lang.org/1.78.0/std/arch/macro.is_riscv_feature_detected.html>.
tgross35
force-pushed
the
std_detect-updates
branch
from
October 27, 2026 08:33
84f7df7 to
51ff312
Compare
Member
Author
|
@bors try jobs=test-i686-gnu-1 |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 27, 2026
std: Clean up and improve errors for `is_*_feature_detected` macros try-job: test-i686-gnu-1
Contributor
Member
Author
|
@rustbot ready |
Rather than transmuting discriminants, use the macros to generate a list of all features that we can iterate instead. This also allows us to remove the sentinel `_last` entry.
This branch has not been deployed
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.
View all comments
This includes a handful of small changes around the internals of our feature detection macros:
This is done in a handful of separate commits, the messages have some more details.
r? libs