I've got a project which is organized as follows:
- project A
pub mod a;
pub mod b;
Now I have a function in file a.rs. I want to use it in file b.rs. How can I do this?
You should be able to reference public items in module
crate::common::a::whatever (from anywhere in the tests, as long as the test file includes the
I've tried super. But I get:
Could not find 'a' in 'super'
I've also tried crate. But I get:
Could not find 'a' in 'common'
I confirmed that it worked for me on rustc 1.65.0. The only way I can replicate that error is if I remove the
mod a; from the