 <p>The problem is that <code>use</code> paths are <em>absolute, not relative</em>. When you say <code>use A;</code> what you are actually saying is "use the symbol <code>A</code> in the root module of this crate", which would be <code>lib.rs</code>.</p> <p>What you need to use is <code>use super::A;</code>, that or the full path: <code>use foo::A;</code>.</p> <p>I wrote up a an article on <a href="https://gist.github.com/DanielKeep/470f4e114d28cd0c8d43">Rust's module system and how paths work</a> that might help clear this up if the <a href="http://doc.rust-lang.org/book/crates-and-modules.html">Rust Book chapter on Crates and Modules</a> doesn't.</p>