Macro std::include 1.0.0
[−]
[src]
macro_rules! include { ($file:expr) => { ... }; }
1.0.0
Parse a file as an expression or an item according to the context.
The file is located relative to the current file. (similarly to how modules are found)
Using this macro is often a bad idea, because if the file is parsed as an expression, it is going to be placed in the surrounding code unhygenically. This could result in variables or functions being different from what the file expected if there are variables or functions that have the same name in the current file.
Examples
fn foo() { include!("/path/to/a/file") }Run