That was my understanding. Without knowing much about the compiler, `mod` seems to declare an item. It would be weird to allow imports between item declarations.
~Brendan On 06/08/2013, at 5:53 AM, Gareth Smith <[email protected]> wrote: > On 05/08/13 19:56, Dov Reshef wrote: >> >> If I understand correctly "mod foo" import the foo module into the current >> module, and "use foo::bar" bring bar from foo module into the current scope, >> so it seems more logical that use should follow mod, not the other way >> around. > > My understanding is that "mod foo;" is kind of like "mod foo { ... }" except > that with "mod foo;" the body of the module comes from a different file, so > it is more like a definition than an import. > > Gareth > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
