-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
add unreachable_cfgs lint
#149960
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
base: main
Are you sure you want to change the base?
add unreachable_cfgs lint
#149960
Conversation
This is emitted on branches of a `cfg_select!` that are statically known to be unreachable.
|
Some changes occurred in compiler/rustc_attr_parsing |
|
rustbot has assigned @WaffleLapkin. Use |
|
The proposed name for this lint seems quite unfortunate to me. When I first read it I though it had something to do with the I think it would be better include the word "arm" or "cfg_select" in it, to clearly disambiguate it from the other places where cfgs can appear. Maybe |
|
There is some reasoning for then name at #149783 (comment). cc @traviscross was there any particular reason for you to leave out the select or arm/branch parts? |
|
The reasoning was: For Here that would suggest the name But we have an existing lint, To your point about detecting Sitting with it now, though, I think |
|
☔ The latest upstream changes (presumably #146348) made this pull request unmergeable. Please resolve the merge conflicts. |
tracking issue: #115585
Split out from #149783. This lint is emitted on branches of a
cfg_select!that are statically known to be unreachable. The lint is only emitted when the feature is enabled, so this change specifically does not need an FCP, and the lint will be stabilized alongside the feature (see #149783 (comment)).