Skip to content

Document #[cfg(version(...))] #1828

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
Open

Conversation

est31
Copy link
Member

@est31 est31 commented May 17, 2025

Document #[cfg(version(...))] as it is to be stabilized.

Tracking issue: rust-lang/rust#64796
RFC: rust-lang/rfcs#2523
Stabilization PR: rust-lang/rust#141137
Earlier documentation PR filed for the first attempt: #981

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label May 17, 2025
Comment on lines +58 to +61
r[cfg.predicate.version]
* `version()` with a version number inside. It is true if the language version
the compiler targets is higher or equal to the contained version number.
It is false otherwise.
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs grammar, above, as for the other predicates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants