Include a file: Difference between revisions

m
Line 1,009:
 
=={{header|Rust}}==
In Rust it's a two-step process: you have to declare that athe 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).
 
The compiler will include either a 'test.rs' or a 'test/mod.rs' (if the first one doesn't exist) file.
3

edits