I solve my problem by using absolute path every where. It's ok but I
can't use the source file in another program with another root module.
Philippe Delrieu
I've read the tutorial
Le 08/11/2013 20:36, Alex Crichton a écrit :
I would recommend reading about Rust's module system at
http://static.rust-lang.org/doc/master/tutorial.html#crates-and-the-module-system
to get more familiar with how things work.
You may also want to read about how import statements work at
http://static.rust-lang.org/doc/master/rust.html#use-declarations to
get an idea of how to bring these names into scope.
In rust's module system, you don't really load modules per-se, but
rather insert them at certain points in the namespace hierarchy. It's
perfectly valid to insert the same module at multiple locations in the
hierarchy, but I agree that this may not always have the expected
behavior. This probably warrants a lint mode for this which is warn by
default about inserting the same file into the module hierarchy twice,
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev