@@ -336,19 +336,19 @@ features = ["secure-password", "civet"]
336
336
337
337
The usage of features is subject to a few rules:
338
338
339
- 1 . Feature names must not conflict with other package names in the manifest.
340
- This is because they are opted into via ` features = [...] ` , which only has a
341
- single namespace.
342
- 2 . With the exception of the ` default ` feature, all features are opt-in. To opt
343
- out of the default feature, use ` default-features = false ` and cherry-pick
344
- individual features.
345
- 3 . Feature groups are not allowed to cyclically depend on one another.
346
- 4 . Dev-dependencies cannot be optional.
347
- 5 . Features groups can only reference optional dependencies.
348
- 6 . When a feature is selected, Cargo will call ` rustc ` with `--cfg
349
- feature="${feature_name}"`. If a feature group is included, it and all of its
350
- individual features will be included. This can be tested in code via
351
- ` #[cfg(feature = "foo")] ` .
339
+ * Feature names must not conflict with other package names in the manifest. This
340
+ is because they are opted into via ` features = [...] ` , which only has a single
341
+ namespace.
342
+ * With the exception of the ` default ` feature, all features are opt-in. To opt
343
+ out of the default feature, use ` default-features = false ` and cherry-pick
344
+ individual features.
345
+ * Feature groups are not allowed to cyclically depend on one another.
346
+ * Dev-dependencies cannot be optional.
347
+ * Features groups can only reference optional dependencies.
348
+ * When a feature is selected, Cargo will call ` rustc ` with `--cfg
349
+ feature="${feature_name}"`. If a feature group is included, it and all of its
350
+ individual features will be included. This can be tested in code via
351
+ ` #[cfg(feature = "foo")] ` .
352
352
353
353
Note that it is explicitly allowed for features to not actually activate any
354
354
optional dependencies. This allows packages to internally enable/disable
0 commit comments