Case convention for feature names #101
Replies: 5 comments
-
There is a fairly common case that a feature enables a dependency on a crate with the same name, enabling extra features, e.g. |
Beta Was this translation helpful? Give feedback.
-
There are two different extra-crate sources for feature names, each with its own case convention:
|
Beta Was this translation helpful? Give feedback.
-
Can you share some examples? |
Beta Was this translation helpful? Give feedback.
-
I have one in one of my crates: #![cfg_attr(feature = "never_type", feature(never_type))] Correctly it's snake case, not camel case. |
Beta Was this translation helpful? Give feedback.
-
Right, "camel case" confused me. :) |
Beta Was this translation helpful? Give feedback.
-
Are they kebab case or camel case? This needs to be documented under C-CASE.
I propose that the answer should be the same as the answer for crate names (#29). That way the implicit feature that enables an optional dependency follows the same case convention as every explicit feature.
Beta Was this translation helpful? Give feedback.
All reactions