Skip to content
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

Remove useless conditional compilation #5375

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Jun 8, 2022

Context: rustc added a few month ago --check-cfg support and enable it in the rust-lang/rust repo for every build.

I found out that rustfmt has a cfg!(release) condition that was triggering the unstable unexpected_cfgs lint. The problem is that nothing (nor rustc, nor cargo, or anythingis setting therelease` cfg.

This PR removes the code behind the cfg. I have tested the patch with and without --release, with and without running the tests.

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

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

thanks!

@calebcartwright calebcartwright merged commit 5fa2727 into rust-lang:master Jun 10, 2022
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jan 22, 2023
…k-cfgs, r=Mark-Simulacrum

bootstrap: cleanup the list of extra check cfgs

This PR performs some cleanups on the `EXTRA_CHECK_CFGS` list in bootstrap.

- `target_os=watchos`: no longer relevant because there are now proper targets `*-apple-watchos`
 - `target_arch=nvptx64`: target `nvptx64-nvidia-cuda` makes it useless
 - `target_arch=le32`: target was removed (rust-lang#45041)
 - ~~`release`: was removed from rustfmt (rust-lang/rustfmt#5375 and rust-lang/rustfmt#5449 (despite the changes being done more than 6 months ago there hasn't been any rustfmt subtree sync)
 - `dont_compile_me`: was removed from stdarch (rust-lang/stdarch#1308)

Also made some external cfg exception mode clear and only activated for rustc and rustc tools (as to not have the Standard Library unintentionally depend on them).
Urgau added a commit to Urgau/rust that referenced this pull request Jan 25, 2023
 - `target_os=watchos`: no longer relevant because there are now proper
   targets `*-apple-watchos`
 - `target_arch=nvptx64`: `nvptx64-nvidia-cuda`
 - `target_arch=le32`: target was removed
   (rust-lang#45041)
 - `release`: was removed from rustfmt
   (rust-lang/rustfmt#5375 and
   rust-lang/rustfmt#5449)
 - `dont_compile_me`: was removed from stdarch
   (rust-lang/stdarch#1308)

Also made some external cfg exception mode clear and only activated for
rustc and rustc tools (as to not have the Standard Library
unintentionally depend on them).
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jan 29, 2023
…k-cfgs, r=Mark-Simulacrum

bootstrap: cleanup the list of extra check cfgs

This PR performs some cleanups on the `EXTRA_CHECK_CFGS` list in bootstrap.

- `target_os=watchos`: no longer relevant because there are now proper targets `*-apple-watchos`
 - `target_arch=nvptx64`: target `nvptx64-nvidia-cuda` makes it useless
 - `target_arch=le32`: target was removed (rust-lang#45041)
 - `release`: was removed from rustfmt (rust-lang/rustfmt#5375 and rust-lang/rustfmt#5449)
 - `dont_compile_me`: was removed from stdarch (rust-lang/stdarch#1308)

Also made some external cfg exception mode clear and only activated for rustc and rustc tools (as to not have the Standard Library unintentionally depend on them).
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 30, 2023
…cfgs, r=Mark-Simulacrum

bootstrap: cleanup the list of extra check cfgs

This PR performs some cleanups on the `EXTRA_CHECK_CFGS` list in bootstrap.

- `target_os=watchos`: no longer relevant because there are now proper targets `*-apple-watchos`
 - `target_arch=nvptx64`: target `nvptx64-nvidia-cuda` makes it useless
 - `target_arch=le32`: target was removed (rust-lang#45041)
 - `release`: was removed from rustfmt (rust-lang/rustfmt#5375 and rust-lang/rustfmt#5449)
 - `dont_compile_me`: was removed from stdarch (rust-lang/stdarch#1308)

Also made some external cfg exception mode clear and only activated for rustc and rustc tools (as to not have the Standard Library unintentionally depend on them).
bors added a commit to rust-lang/miri that referenced this pull request Jan 31, 2023
…ark-Simulacrum

bootstrap: cleanup the list of extra check cfgs

This PR performs some cleanups on the `EXTRA_CHECK_CFGS` list in bootstrap.

- `target_os=watchos`: no longer relevant because there are now proper targets `*-apple-watchos`
 - `target_arch=nvptx64`: target `nvptx64-nvidia-cuda` makes it useless
 - `target_arch=le32`: target was removed (rust-lang/rust#45041)
 - `release`: was removed from rustfmt (rust-lang/rustfmt#5375 and rust-lang/rustfmt#5449)
 - `dont_compile_me`: was removed from stdarch (rust-lang/stdarch#1308)

Also made some external cfg exception mode clear and only activated for rustc and rustc tools (as to not have the Standard Library unintentionally depend on them).
thomcc pushed a commit to tcdi/postgrestd that referenced this pull request May 31, 2023
…ark-Simulacrum

bootstrap: cleanup the list of extra check cfgs

This PR performs some cleanups on the `EXTRA_CHECK_CFGS` list in bootstrap.

- `target_os=watchos`: no longer relevant because there are now proper targets `*-apple-watchos`
 - `target_arch=nvptx64`: target `nvptx64-nvidia-cuda` makes it useless
 - `target_arch=le32`: target was removed (rust-lang/rust#45041)
 - `release`: was removed from rustfmt (rust-lang/rustfmt#5375 and rust-lang/rustfmt#5449)
 - `dont_compile_me`: was removed from stdarch (rust-lang/stdarch#1308)

Also made some external cfg exception mode clear and only activated for rustc and rustc tools (as to not have the Standard Library unintentionally depend on them).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants