Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub(crate) mod shawn {
    // `#[allow(dead_code)]` 属性可以禁用 `dead_code` lint
    #[allow(dead_code)]
    pub(crate) const A: &str = "本地常量";
    #[allow(dead_code)]
    pub(crate) fn log(e_data: &str) {
        println!("Hello,world! 打印传入的参数 {}", e_data);
        hello_world::log_a();
    }
    #[allow(dead_code)]
    mod hello_world {
        use crate::shawn::shawn::shawn::A;
        pub(crate) fn log_a() {
            println!("Hello,world! 打印本地 A 常量 {}", A);
        }
    }
}