Rust The #[path] attribute


Example

Rust's #[path] attribute can be used to specify the path to search for a particular module if it is not in the standard location. This is typically discouraged, however, because it makes the module hierarchy fragile and makes it easy to break the build by moving a file in a completely different directory.

#[path="../path/to/module.rs"]
mod module;