Is the #line directive in any way available in Rust?
C/C++ preprocessors have it, for example (see Preprocessor directives - C++ Tutorials), which is very helpful to create nice error messages for generated code. It can be used to show the erroneous line and filename of the original template instead of the position in the generated file.