title: lazy_static raises error as "no rules expected the token"
body: <p>I'm trying to use <a href="https://crates.io/crates/lazy_static" rel="nofollow noreferrer">lazy_static</a> crate to initialize some static variables which assigned values by reading some environment variables in <code>build.rs</code>. What I'm trying to achieve is similar to <a href="https://stackoverflow.com/questions/37405835/populating-a-static-const-with-an-environment-variable-at-runtime-in-rust">this post</a>.</p>
  
  <p>My code is following:</p>
  
  <pre><code>lazy_static! {
  
  static _spdk_dir : String = match env::var("SPDK_DIR") {
      Ok(val) =&gt; val,
      Err(_e) =&gt; panic!("SPDK_DIR is not defined in the environment")
  };
  
  static _dpdk_dir: String = match env::var("DPDK_DIR") {
      Ok(val) =&gt; val,
      Err(_e) =&gt; panic!("DPDK_DIR is not defined in the environment")
  };
  }
  </code></pre>
  
  <p>After running <code>cargo test</code>, the compiler gives <code>error: no rules expected the token _spdk_dir</code>. I can get rid of this error by adding the keyword <code>ref</code> after <code>static</code> 
  but doing so will lead another error when use the variable with <code>println!</code>:</p>
  
  <pre><code>println!("cargo:warning={}", _spdk_dir);
  </code></pre>
  
  <p>The error is <code>_spdk_dir doesn't implement std::fmt::Display</code></p>
  
  <p>I'm wondering how can I solve the problem? Thanks!</p>