Closed
Description
Something like this would be nice for code generation in Cargo. (See rust-lang/cargo#824.)
#[path = concat!(env!("OUT_DIR"), "/hello.rs")]
mod foo;
But it currently doesn’t parse:
a.rs:1:10: 1:16 error: unexpected token: `concat`
a.rs:1 #[path = concat!(env!("OUT_DIR"), "/hello.rs")]
^~~~~~
Can we make this work? I have a hack in #18810 (comment) to work around it, but it’s ugly.