Closed
Description
I want mymacro!(bar)
to expand to fn foo_bar() { }
.
#[feature(macro_rules)];
macro_rules! mymacro( ($x:ident) => (
fn concat_idents!(foo_, $x)() { }
))
mymacro!(bar)
fn main() {
foo_bar();
}
gives
foo.rs:4:21: 4:22 error: expected `(` but found `!`
foo.rs:4 fn concat_idents!(foo_, $x)() { }
on
rustc 0.9 (d3b3c66 2014-01-12 19:44:26 -0700)
host: x86_64-unknown-linux-gnu