Hi There! New to the community.
Reading the book I found this line and decided to try it.
Starting relative paths with self when specified after use might not be neccesary in the future; it’s an inconsistency in the language that people are working on eliminating.
open https://doc.rust-lang.org/book/ch07-02-modules-and-use-to-control-scope-and-privacy.html
Using rustc version 1.32.0 (9fda7c223 2019-01-16), the self keyboard is already not necessary.
The following code compiles without errors
mod sound {
pub mod instrument {
pub fn clarinet () {
super::voice::sing();
println!("clarinet");
}
}
pub mod voice {
pub fn sing () {
}
}
}
use sound::instrument;
use self::sound::instrument;