Allow boolean literals in --check-cfg
#854
Labels
final-comment-period
The FCP has started, most (if not all) team members are in agreement
major-change
A proposal to make a major change to rustc
T-compiler
Add this label so rfcbot knows to poll the compiler team
to-announce
Announce this issue on triage meeting
Proposal
Currently, the
--check-cfg
option denies boolean literals, despite--cfg
allowing them (they can be accessed in code viacfg!(r#true)
.) The flag should be amended to allow this.This is also consistent with keywords such as
while
, which can be specified under--cfg
and--check-cfg
then accessed with raw identifiers (#[cfg(r#while)]
).This was noticed in the
cfg_boolean_literals
stabilization and requested by T-lang.The change is implemented in rust-lang/rust#138767 and is insta-stable.
Context:
rust-lang/rust#138632 (comment)
rust-lang/rust#138767
Mentors or Reviewers
@Urgau
Process
The main points of the Major Change Process are as follows:
@rustbot second
.-C flag
, then full team check-off is required.@rfcbot fcp merge
on either the MCP or the PR.You can read more about Major Change Proposals on forge.
The text was updated successfully, but these errors were encountered: