Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
Accelerator
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading.
Please reload this page
.
rust-lang
/
rust
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
15.4k
Star
116k
Code
Issues
5k+
Pull requests
1.3k
Actions
Projects
Security and quality
6
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
rustfmt: Format
cfg_select!
- #154202
#154202
Merged
rust-bors[bot]
merged 11 commits into
rust-lang:main
rust-lang/rust:main
from
ytmimi:format_cfg_select
ytmimi/rust:format_cfg_select
Copy head branch name to clipboard
Jul 31, 2026
Conversation
Commits
11
(11)
Checks
Files changed
Merged
rustfmt: Format
cfg_select!
#154202
rust-bors[bot]
merged 11 commits into
rust-lang:main
rust-lang/rust:main
from
ytmimi:format_cfg_select
ytmimi/rust:format_cfg_select
Copy head branch name to clipboard
Commits
Commits on Jul 30, 2026
feat: parse `cfg_select!` within rustfmt
Show description for 8c8a3d7
ytmimi
committed
8c8a3d7
View commit details
Copy full SHA for 8c8a3d7
Browse repository at this point
chore: make `rewrite_match_body` `pub(crate)` within rustfmt
Show description for 65fb2bb
ytmimi
committed
65fb2bb
View commit details
Copy full SHA for 65fb2bb
Browse repository at this point
feat: implement `cfg_select!` formatting in rustfmt
ytmimi
committed
ea47e34
View commit details
Copy full SHA for ea47e34
Browse repository at this point
test: Add more `cfg_select!` test cases based on the PR review feedback
ytmimi
committed
a932a6d
View commit details
Copy full SHA for a932a6d
Browse repository at this point
docs: Add doc comments based on PR feedback
ytmimi
committed
d18984c
View commit details
Copy full SHA for d18984c
Browse repository at this point
feat: flatten `cfg_select!` arms if they're a single expression
ytmimi
committed
d32c7e9
View commit details
Copy full SHA for d32c7e9
Browse repository at this point
fix: rename `parse_cfg_select` -> `parse_cfg_select_arms`
Show description for 668f27f
ytmimi
committed
668f27f
View commit details
Copy full SHA for 668f27f
Browse repository at this point
refactor: reorder `format_cfg_select` arguments
Show description for 069095c
ytmimi
committed
069095c
View commit details
Copy full SHA for 069095c
Browse repository at this point
fix: make sure we cancel diagnostic errors when parsing `cfg_select!` arms
ytmimi
committed
6d7cb41
View commit details
Copy full SHA for 6d7cb41
Browse repository at this point
fix: No need to clone before calling `context.leave_macro`
Show description for 447c46f
ytmimi
committed
447c46f
View commit details
Copy full SHA for 447c46f
Browse repository at this point
test: Add test case where `cfg_select!` falls back to default macro handling
ytmimi
committed
ca398cd
View commit details
Copy full SHA for ca398cd
Browse repository at this point
You can’t perform that action at this time.