Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::fmt::Debug;
- mod b {
- pub fn fun_b() {}
- }
- mod a
- {
- use std::fmt::Debug;
- use b::fun_b;
- trait A : Debug {}
- fn fun_a() {
- fun_b();
- }
- mod c
- {
- /* NOTE: SHOULD be here - dependency not transistive, not implicit */
- use b::fun_b;
- /* dependency should be declared explicitly, no "embedded" semantics */
- use a::fun_a;
- pub fn fun_c() {
- fun_b();
- fun_a();
- }
- }
- /* mod in enclosing scope is also use for it */
- fn fun_g() {
- c::fun_c();
- }
- }
- fn main() {
- }
Add Comment
Please, Sign In to add comment