blob: cd4a845f7c07dd3cc8bd6a834612b36772980566 [file] [log] [blame]
// check-pass
#![feature(pub_macro_rules)]
mod m {
// `pub` `macro_rules` can be used earlier in item order than they are defined.
foo!();
pub macro_rules! foo { () => {} }
// `pub(...)` works too.
pub(super) macro_rules! bar { () => {} }
}
// `pub` `macro_rules` are available by module path.
m::foo!();
m::bar!();
fn main() {}