title: Does `#[test]` imply `#[cfg(test)]`?
body: <p>Conventionally, unit tests in Rust are given a separate module, which is conditionally compiled with <code>#[cfg(test)]</code>:</p>
  
  <pre><code>#[cfg(test)]
  mod tests {
      #[test]
      fn test1() { ... }
  
      #[test]
      fn test2() { ... }
  }
  </code></pre>
  
  <p>However, I've been using a style where tests are more inline:</p>
  
  <pre><code>pub fn func1() {...}
  
  #[cfg(test)]
  #[test]
  fn test_func1() {...}
  
  pub fn func2() {...}
  
  #[cfg(test)]
  #[test]
  fn test_func2() {...}
  </code></pre>
  
  <p>My question is, does <code>#[test]</code> imply <code>#[cfg(test)]</code>? That is, if I tag my test functions with <code>#[test]</code> but not <code>#[cfg(test)]</code>, will they still be correctly absent in non-test builds?</p>