7oty
2020-11-11
看完文档再来看视频,感觉更难理解了
13
依然藏锋
2021-03-03
// outer_mod 内部可见 pub(super) fn super_mode_visible_fn() { // 因为使用 super 关键字 inner 的super 就是outer_mod // 访问同级模块函数 inner_mode_visible_fn(); // 访问父模块的函数需要使用 super 前缀 super::outer_mod_fn(); } 这里我试了,要使用 super 关键字才可以 编译通过,如果使用 :: 则不行。