Include a file: Difference between revisions

Content added Content deleted
Line 1,009: Line 1,009:


=={{header|Rust}}==
=={{header|Rust}}==
In Rust it's a two-step process: you have to declare that a module exists (using <code>mod</code> ''once'') and then import the module available (implied by <code>mod</code>, but needs <code>use</code> in other modules).
In Rust it's a two-step process: you have to declare that the module exists (using <code>mod</code> ''once'') and then import the module (implied by <code>mod</code>, but needs <code>use</code> in other modules).


The compiler will include either a 'test.rs' or a 'test/mod.rs' (if the first one doesn't exist) file.
The compiler will include either a 'test.rs' or a 'test/mod.rs' (if the first one doesn't exist) file.