title: What is an idiomatic way to implement a trait only for tests across multiple crates?
body: <p>I work in a workspace with dozens of crates. One of those crates exposes a trait. As a mock, I implement that trait for <code>()</code> with <code>unimplemented!</code> in every function (they're not actually used). I'd like that implementation to be available from the other crates, but only during the tests: what is the idiomatic way (the handiest) to do so?</p>
  <p>For now, the implementation is behind a <code>mock</code> feature, and I add this crate with the <code>mock</code> feature as a dev dependency in a random crate. That forces the compiler to take that implementation into account during the tests. It's an ugly hack, so I'd rather have another way.</p>