Closed
Description
Proposal
Currently, the --check-cfg
option denies boolean literals, despite --cfg
allowing them (they can be accessed in code via cfg!(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
Process
The main points of the Major Change Process are as follows:
- File an issue describing the proposal.
- A compiler team member or contributor who is knowledgeable in the area can second by writing
@rustbot second
.- Finding a "second" suffices for internal changes. If however, you are proposing a new public-facing feature, such as a
-C flag
, then full team check-off is required. - Compiler team members can initiate a check-off via
@rfcbot fcp merge
on either the MCP or the PR.
- Finding a "second" suffices for internal changes. If however, you are proposing a new public-facing feature, such as a
- Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.
You can read more about Major Change Proposals on forge.