title: Is there a way to enforce correct spelling of features?
body: <p>Let's assume I have the following feature defined in <code>Cargo.toml</code>:</p>
  <pre><code>[features]
  my_feature = []
  </code></pre>
  <p>And the following code lives in <code>src/lib.rs</code>:</p>
  <pre class="lang-rust prettyprint-override"><code>#[cfg(feature = &quot;my_feature&quot;)]
  fn f() { /* ... */ }
  
  #[cfg(not(feature = &quot;my_faeture&quot;))] // &lt;-- Mind the typo!
  fn f() { /* ... */ }
  </code></pre>
  <p>How can I enforce, that the feature-strings are matched against the list of both explicitly defined and implicitly available features in <code>Cargo.toml</code> so that for instance typos could be avoided?</p>