语法大白活
模块 mod
mod mod_test{
pub fn hello(){
println!("hi");
}
pub mod mod_inner{
pub fn hello1(){
println!("hi inner mod");
}
}
}
fn main(){
//这里要调用模块 mod_test()
crate::mod_test::hello();
}注解
最后更新于