rust/tests/ui/needless_pub_self.fixed

34 lines
620 B
Rust
Raw Normal View History

2023-07-27 11:40:22 +00:00
//@aux-build:proc_macros.rs
2023-06-16 15:51:47 +00:00
#![feature(custom_inner_attributes)]
#![allow(unused)]
#![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() {}
fn b() {}
pub fn c() {}
mod a {
pub(in super) fn d() {}
pub(super) fn e() {}
fn f() {}
}
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