title: Is there any way to represent an OsStr or OsString literal?
body: <p>I'd like to define an <code>OsStr</code> constant for an extension comparison that's going to happen many times. For example:</p>
  
  <pre><code>const DCM_EXTENSION: Option&lt;&amp;'static OsStr&gt; = Some("dcm");
  const DCM_EXTENSION: Option&lt;&amp;'static OsStr&gt; = Some(OsStr::new("dcm"));
  </code></pre>
  
  <p>This should make it trivial and unfallable to do the comparison:</p>
  
  <pre><code>if entry.file_type().is_file() &amp;&amp; entry.path().extension() == DCM_EXTENSION:
  </code></pre>
  
  <p>Neither method works due to lack of const fn and a type mismatch, respectively.</p>
  
  <p>My current workaround is to convert at runtime before doing any comparisons:</p>
  
  <pre><code>const DCM_EXTENSION_STR: Option&lt;&amp;'static str&gt; = Some("dcm");
  
  main!(|args: Cli, log_level: verbosity| {
      let dcm_extension = DCM_EXTENSION_STR.map(OsStr::new);
      // ...
  });
  </code></pre>
  
  <p>I figure this avoids a per-access penalty that lazy_static would impose and works out to a one-time runtime penalty that is negligible.</p>