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

Stabilize checking of cfgs at compile-time: --check-cfg option #123501

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Apr 5, 2024

This PR stabilize the --check-cfg CLI option of rustc (and rustdoc) 🎉.

In particular this PR does two things:

  1. it makes the --check-cfg option stable
  2. and it moves the documentation to the stable books

FCP: #82450 (comment)

Resolves #82450

@rustbot labels S-blocked F-check-cfg
r? @petrochenkov

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. F-check-cfg --check-cfg S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Apr 5, 2024
@petrochenkov petrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 5, 2024
@bors

This comment was marked as resolved.

@rustbot
Copy link
Collaborator

rustbot commented Apr 6, 2024

triagebot.toml has been modified, there may have been changes to the review queue.

cc @davidtwco, @wesleywiser

@rustbot rustbot added the A-meta Area: Issues about the rust-lang/rust repository. label Apr 6, 2024
@bors

This comment was marked as resolved.

@Urgau Urgau force-pushed the stabilize-check-cfg branch 2 times, most recently from 5964a08 to 5a1ec56 Compare April 7, 2024 10:42
@rust-log-analyzer

This comment has been minimized.

@Urgau
Copy link
Member Author

Urgau commented Apr 15, 2024

FCP has finished 🎉

@rustbot labels -S-blocked S-waiting-on-review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Apr 15, 2024
@petrochenkov
Copy link
Contributor

r=me after rebase.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 15, 2024
@bors

This comment was marked as resolved.

@Urgau
Copy link
Member Author

Urgau commented Apr 15, 2024

Rebased and CI passes. (but don't have r rights)

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 15, 2024
@petrochenkov
Copy link
Contributor

@bors r

@bors
Copy link
Contributor

bors commented Apr 16, 2024

📌 Commit a20de73 has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 16, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 16, 2024
…chenkov

Stabilize checking of cfgs at compile-time: `--check-cfg` option

This PR stabilize the `--check-cfg` CLI option of `rustc` (and `rustdoc`) 🎉.

In particular this PR does two things:
  1. it makes the `--check-cfg` option stable
  2. and it moves the documentation to the stable books

FCP: rust-lang#82450 (comment)

Resolves rust-lang#82450

`@rustbot` labels  S-blocked  F-check-cfg
r? `@petrochenkov`
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#122632 (fetch submodule before checking llvm stamp)
 - rust-lang#123355 (Support type '/' to search)
 - rust-lang#123501 (Stabilize checking of cfgs at compile-time: `--check-cfg` option)
 - rust-lang#123535 (Match ergonomics 2024: `mut` doesn't reset binding mode)
 - rust-lang#123711 (drop `changelog-seen`)
 - rust-lang#123969 (The new solver ignores `DefineOpaqueTypes`, so switch it to `Yes`)
 - rust-lang#124007 (Miri subtree update)
 - rust-lang#124017 (Change a diagnostics-path-only `DefineOpaqueTypes` to `Yes`.)
 - rust-lang#124018 (interpret: pass MemoryKind to before_memory_deallocation)
 - rust-lang#124024 (interpret: remove outdated comment)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f54219c into rust-lang:master Apr 16, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 16, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2024
Rollup merge of rust-lang#123501 - Urgau:stabilize-check-cfg, r=petrochenkov

Stabilize checking of cfgs at compile-time: `--check-cfg` option

This PR stabilize the `--check-cfg` CLI option of `rustc` (and `rustdoc`) 🎉.

In particular this PR does two things:
  1. it makes the `--check-cfg` option stable
  2. and it moves the documentation to the stable books

FCP: rust-lang#82450 (comment)

Resolves rust-lang#82450

``@rustbot`` labels  S-blocked  F-check-cfg
r? ``@petrochenkov``
@Urgau
Copy link
Member Author

Urgau commented Apr 16, 2024

Hurrah ! 🎉

@rustbot label relnotes

@rustbot rustbot added the relnotes Marks issues that should be documented in the release notes of the next release. label Apr 16, 2024
taiki-e added a commit to taiki-e/github-actions that referenced this pull request Apr 17, 2024
taiki-e added a commit to taiki-e/portable-atomic that referenced this pull request Apr 17, 2024
taiki-e added a commit to taiki-e/portable-atomic that referenced this pull request Apr 17, 2024
taiki-e added a commit to taiki-e/atomic-maybe-uninit that referenced this pull request Apr 17, 2024
bors added a commit to rust-lang/cargo that referenced this pull request May 3, 2024
Stabilize `-Zcheck-cfg` as always enabled

This PR stabilize the `-Zcheck-cfg` option as always enabled.

~~Waiting on rust-lang/rust#82450 (comment) to complete, but is otherwise ready to be reviewed (in particular the documentation changes).~~ (rust-lang/rust#123501)

Fixes #10554
shrik3 added a commit to shrik3/rustubs that referenced this pull request Jun 4, 2024
1. allow unexpected cfgs in lib.rs, in this case
   "no_global_oom_handling" is cause warnings [1]

2. for large code models the compiler (rust linkers) now put code and
   data in `.ltext`, `.ldata`, `.lbss`, `.lrodata` instead of the
   same `.text` , `.data` ... etc. We are adjusting accordingly in the
   linker script.

3. unsafe assertions identified undefined behaviours, in this case a repr(C)
   struct was not mared as repr(packed), therefore having an unexpected
   size. The unsafe assertions was not enabled by default in debug
   builds so the idt setup code with from_raw_parts_mut() has been
   working on UB. Glad we can catch this....

related: [1] rust-lang/rust#123501
related: [2] https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html#asserting-unsafe-preconditions
shrik3 added a commit to shrik3/rustubs that referenced this pull request Jun 11, 2024
1. allow unexpected cfgs in lib.rs, in this case
   "no_global_oom_handling" is cause warnings [1]

2. for large code models the compiler (rust linkers) now put code and
   data in `.ltext`, `.ldata`, `.lbss`, `.lrodata` instead of the
   same `.text` , `.data` ... etc. We are adjusting accordingly in the
   linker script.

3. unsafe assertions identified undefined behaviours, in this case a repr(C)
   struct was not mared as repr(packed), therefore having an unexpected
   size. The unsafe assertions was not enabled by default in debug
   builds so the idt setup code with from_raw_parts_mut() has been
   working on UB. Glad we can catch this....

related: [1] rust-lang/rust#123501
related: [2] https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html#asserting-unsafe-preconditions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues about the rust-lang/rust repository. F-check-cfg --check-cfg relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking Issue for RFC 3013: Checking conditional compilation at compile time
5 participants