How to use functions in files under the same directory?


Say for a library crate, under src/ I have 3,,

I write a function f() in How can I call it in file

If I write mod b; in, the compiler will find it under directory src/a/. But this is not what I want. For example, I may have cyclic dependency.


OK. I fix this.

In file, make f() pub.

Then in file, add this line: use b::*; (I actually want to import all functions like f()).