Open rrichardson opened 1 year ago
Hah, for sure! Maybe the import location should be specified explicitly or something like it.
Hah, for sure! Maybe the import location should be specified explicitly or something like it.
Another option would be for an explicit header similar to rust::import
(lang::import
) but for headers.
This feature could also be used for comments.
e.g.
let header = rust::header("/* generated code using the assume genco library */");
let clippy = rust::header("#![allow(clippy)]");
let tokens = quote{ $(register( (header, clippy) );
...
};
When attempting to put
#![allow(clippy)]
at the top of a file, it gets placed below any imports created byregister
.It'd be nice to specify, perhaps in the Rust config, any top-of-module lines that must be present.
The workaround is to just insert such things first at the top of a file, but this sort of breaks the abstraction.