| //@aux-build:proc_macros.rs | |
| #![feature(custom_inner_attributes)] | |
| #![warn(clippy::needless_pub_self)] | |
| #![no_main] | |
| #![rustfmt::skip] // rustfmt will remove `in`, understandable | |
| // but very annoying for our purposes! | |
| #[macro_use] | |
| extern crate proc_macros; | |
| fn a() {} | |
| //~^ needless_pub_self | |
| fn b() {} | |
| //~^ needless_pub_self | |
| pub fn c() {} | |
| mod a { | |
| pub(in super) fn d() {} | |
| pub(super) fn e() {} | |
| fn f() {} | |
| //~^ needless_pub_self | |
| } | |
| external! { | |
| pub(self) fn g() {} | |
| pub(in self) fn h() {} | |
| } | |
| with_span! { | |
| span | |
| pub(self) fn i() {} | |
| pub(in self) fn j() {} | |
| } | |
| // not really anything more to test. just a really simple lint overall |