2 clippy::many_single_char_names,
3 clippy::blacklisted_name,
4 clippy::redundant_field_names
10 #[derive(Copy, Clone)]
13 #[derive(Copy, Clone)]
27 fn good(a: &mut u32, b: u32, c: &Bar) {}
29 fn good_return_implicit_lt_ref(foo: &Foo) -> &u32 {
33 #[allow(clippy::needless_lifetimes)]
34 fn good_return_explicit_lt_ref<'a>(foo: &'a Foo) -> &'a u32 {
38 fn good_return_implicit_lt_struct(foo: &Foo) -> FooRef {
42 #[allow(clippy::needless_lifetimes)]
43 fn good_return_explicit_lt_struct<'a>(foo: &'a Foo) -> FooRef<'a> {
47 fn bad(x: &u32, y: &Foo, z: &Baz) {}
50 fn good(self, a: &mut u32, b: u32, c: &Bar) {}
52 fn good2(&mut self) {}
54 fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
56 fn bad2(x: &u32, y: &Foo, z: &Baz) {}
59 impl AsRef<u32> for Foo {
60 fn as_ref(&self) -> &u32 {
66 fn good(&self, a: &mut u32, b: u32, c: &Bar) {}
68 fn bad2(x: &u32, y: &Foo, z: &Baz) {}
72 fn trait_method(&self, _foo: &Foo);
76 fn trait_method2(&self, _color: &Color);
79 impl MyTrait for Foo {
80 fn trait_method(&self, _foo: &Foo) {
86 let (mut foo, bar) = (Foo(0), Bar([0; 24]));
87 let (mut a, b, c, x, y, z) = (0, 0, Bar([0; 24]), 0, Foo(0), 0);
89 good_return_implicit_lt_ref(&y);
90 good_return_explicit_lt_ref(&y);
92 foo.good(&mut a, b, &c);
95 Foo::bad2(&x, &y, &z);
96 bar.good(&mut a, b, &c);
97 Bar::bad2(&x, &y, &z);