title: How to activate an optional dependency?
body: <p><strong>Cargo.toml:</strong></p>
  <pre class="lang-rust prettyprint-override"><code>[features]
  parallel = [&quot;rayon&quot;]
  
  [dependencies.rayon]
  version = &quot;1.5&quot;
  optional = true
  </code></pre>
  <p><strong>lib.rs:</strong></p>
  <pre class="lang-rust prettyprint-override"><code>#[cfg(feature = &quot;parallel&quot;)]
  pub mod par;
  </code></pre>
  <p><strong>Rust Analyzer:</strong></p>
  <pre class="lang-none prettyprint-override"><code>code is inactive due to #[cfg] directives: feature = &quot;parallel&quot; is disabled
  </code></pre>
  <p><em><strong>How to enable the optional dependency?</strong></em></p>