includedir icon indicating copy to clipboard operation
includedir copied to clipboard

Including in a module

Open Eiyeron opened this issue 7 years ago • 0 comments

Hello.

To clean up main.rs, I'd like to include the file resulting from the build script to another module (let's say src/assets.rs).

Alas, the current generated file assumes it's included in the top-level module / main.rs and at build time, trying to use something from includedir fails as it doesn't find the includedir crate (did you mean self::includedir...).

Is it possible to add an option or eventually detect include! in modules to make the generated file include self:: as a suffix and avoid this issue?

Thanks in advance and have a nice day.

Eiyeron avatar Oct 04 '18 12:10 Eiyeron