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
@@ -563,14 +565,22 @@ systematically verify the correct usage of conditional compilation in these lang
563
565
564
566
## Unresolved questions
565
567
566
-
During the RFC process, I expect to resolve the question of what the exact rustc command-line
567
-
parameters should be, at least enough to enable the feature for nightly builds. We should avoid
568
-
bikeshedding on the exact syntax, but should agree on the semantics. We should agree on what is
569
-
checked, what is not checked, how checking is enabled, and how it is performed. We should agree on
570
-
what information is passed from Cargo to Rustc.
571
-
572
-
During the implementation and before stabilization, I expect to resolve the question of how many errors this actually detects. How many crates on crates.io actually have invalid `#[cfg]` usage?
573
-
How valuable is this feature?
568
+
This RFC specifies the exact syntax of this feature in source code and in the
569
+
command-line options for `rustc`. However, it does not address how these will be used
570
+
by tools, such as Cargo. This is a split between "mechanism" and "policy"; the mechanism
571
+
(what goes in `rustc`) is specified in this RFC, but the policies that control this
572
+
mechanism are intentionally left out of scope.
573
+
574
+
We expect the stabilization process for the mechanism (the support in `rustc`) to stabilize
575
+
relatively quickly. Separately, over a much longer time frame, we expect the polices that
576
+
control those options to stabilize more slowly. For example, it seems uncontroversial for
577
+
Cargo to enable checking for `feature = "..."` values immediately; this could be
578
+
implemented and stabilized quickly.
579
+
580
+
However, when (if ever) should Cargo enable checking condition _names_? For crates that
581
+
do not have a `build.rs` script, Cargo could enable checking condition names immediately.
582
+
But for crates that do have a `build.rs` script, we may need a way for those scripts to
583
+
control the behavior of checking condition names.
574
584
575
585
One possible source of problems may come from build scripts (`build.rs` files) that add `--cfg`
576
586
options that Cargo is not aware of. For exaple, if a `Cargo.toml` file did _not_ define a feature
0 commit comments