Currently a macro cannot create a pub fn. It can however create a regular fn. ``` rust #![feature(macro_rules)] macro_rules! foo ( () => ( pub fn foo() -> int { 42 } ) ) struct X; impl X { foo!() } fn main() { println!("{}", X::foo()); } ``` Fails with: ``` $ rustc test.rs test.rs:5:9: 5:12 error: unexpected token: `pub` test.rs:5 pub fn foo() -> int { ^~~ ```