2015-02-12 22:43:57 -06:00
|
|
|
// Issue #18317
|
|
|
|
|
|
|
|
mod bleh {
|
|
|
|
macro_rules! defn {
|
|
|
|
($n:ident) => (
|
|
|
|
fn $n (&self) -> i32 {
|
|
|
|
println!("{}", stringify!($n));
|
|
|
|
1
|
|
|
|
}
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2015-03-30 08:38:27 -05:00
|
|
|
#[derive(Copy, Clone)]
|
2015-02-12 22:43:57 -06:00
|
|
|
pub struct S;
|
|
|
|
|
|
|
|
impl S {
|
|
|
|
pub defn!(f); //~ ERROR can't qualify macro invocation with `pub`
|
2020-01-31 23:18:10 -06:00
|
|
|
//~^ HELP remove the visibility
|
|
|
|
//~| HELP try adjusting the macro to put `pub` inside the invocation
|
2015-02-12 22:43:57 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-03-02 20:32:55 -06:00
|
|
|
fn main() {}
|