I use a library that generates a bunch of code for me, and it often really wants to generate methods that I don't use yet. This leads to noisy warnings when creating my project.
The script generates the old old .rs files in my code base, which I then import and invoke like regular code:
mod autogen_code;
pub use self::autogen_code::*;
I cannot use #![allow(unused_whatever)]
for the generated code, because when I rebuild the project, the script generation starts again and there will be no changes. These files .gitignore
' d and have great comments at the top, saying: "This is all automatically generated. Do not touch."
I do not want to allow unused things in my entire project, so the placement #![allow(unused_whatever)]
at the top of my box is also not a starter.
It is good that the generated files have a predictable name, so I hope there is a way to tell the / rustc load not to give warnings for files matching a specific file name. Is it possible?
source
share