Make it easier to include generated files as module?


Currently, when you have a generated Rust source and you want to include it as a module, you have to do something like

mod generated_mod {
    include!(concat!(env!("OUT_DIR"), "/"));

It would probably be better if it can be simplified to, for example

#[path = "$outdir/"]
mod generated_mod;

or something like this.

What do you think?


See also [Pre-RFC] Macros in Attributes