You're being caught by incorrect usage of mod
.
mod
defines a module.
use
imports an already defined module.
What you should be using is something like your lib.rs
or mod.rs
or whatever containing mod a;
and mod b;
, and then, in a.rs
, use b::B;
, and in b.rs
, use a::A
.