rustc/tests/ui/macros/pub-method-inside-macro.rs
2025-02-17 11:14:05 +01:00

22 lines
222 B
Rust

//@ run-pass
// Issue #17436
mod bleh {
macro_rules! foo {
() => {
pub fn bar(&self) { }
}
}
pub struct S;
impl S {
foo!();
}
}
fn main() {
bleh::S.bar();
}