Closed
Description
macro_rules! printer_method {
{ $id:ident : $string:expr } => {
pure fn $id () { io::println($string) }
}
}
type MyInt = int;
impl MyInt {
printer_method!{ ~"Hullo folks." }
}
fn main() {}
$ rustc macro-in-impl.rs
macro-in-impl.rs:10:4: 10:18 error: unexpected token: `printer_method`
macro-in-impl.rs:10 printer_method!{ ~"Hullo folks." }
Metadata
Metadata
Assignees
Labels
No labels