Include a file: Difference between revisions
→{{header|Rust}}
(Add BaCon) |
|||
Line 1,009:
=={{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).
The compiler will include either a 'test.rs' or a 'test/mod.rs' (if the first one doesn't exist) file.
<lang rust>mod test
|