Closed
Description
Cargo recommends the include!
macro to use generated code.
include!(concat!(env!("OUT_DIR"), "/hello.rs"))
However, it doesn’t seem to be documented, and its source comments say
This is generally a bad idea because it's going to behave unhygienically.
So, is include!
the way forward, or should we find some other mechanism? Maybe make something like this work? (It currently gives error: unexpected token:
concat``)
#[path = concat!(env!("OUT_DIR"), "/hello.rs")]
mod foo;
Metadata
Metadata
Assignees
Labels
No labels