mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
52 lines
797 B
Rust
52 lines
797 B
Rust
|
#![allow(unused)]
|
||
|
#![warn(clippy::used_underscore_items)]
|
||
|
|
||
|
// should not lint macro
|
||
|
macro_rules! macro_wrap_func {
|
||
|
() => {
|
||
|
fn _marco_foo() {}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
macro_wrap_func!();
|
||
|
|
||
|
struct _FooStruct {}
|
||
|
|
||
|
impl _FooStruct {
|
||
|
fn _method_call(self) {}
|
||
|
}
|
||
|
|
||
|
fn _foo1() {}
|
||
|
|
||
|
fn _foo2() -> i32 {
|
||
|
0
|
||
|
}
|
||
|
|
||
|
mod a {
|
||
|
pub mod b {
|
||
|
pub mod c {
|
||
|
pub fn _foo3() {}
|
||
|
|
||
|
pub struct _FooStruct2 {}
|
||
|
|
||
|
impl _FooStruct2 {
|
||
|
pub fn _method_call(self) {}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
_foo1();
|
||
|
let _ = _foo2();
|
||
|
a::b::c::_foo3();
|
||
|
let _ = &_FooStruct {};
|
||
|
let _ = _FooStruct {};
|
||
|
|
||
|
let foo_struct = _FooStruct {};
|
||
|
foo_struct._method_call();
|
||
|
|
||
|
let foo_struct2 = a::b::c::_FooStruct2 {};
|
||
|
foo_struct2._method_call();
|
||
|
}
|