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