- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-syntaxextArea: Syntax extensionsArea: Syntax extensions
Description
I believe this should output the string abc:
#![feature(macro_rules)]
macro_rules! rec(
    () => ("");
    ($a:ident) => (stringify!($a));
    ($a:ident, $($rest:tt),*) => (
        concat!(stringify!($a), rec!($($rest),*))
    );
)
fn main() {
    println!("{}", rec!(a, b, c));
}But I get this error:
reem.rs:7:33: 7:36 error: macro undefined: 'rec'
reem.rs:7         concat!(stringify!($a), rec!($($rest),*))
Rust version:
[andrew@Liger rust] rustc --version
rustc 0.11.0-pre (6d8342f 2014-06-14 17:51:49 +0000)
host: x86_64-unknown-linux-gnuMetadata
Metadata
Assignees
Labels
A-syntaxextArea: Syntax extensionsArea: Syntax extensions