1 #![feature(tool_lints)]
3 #![allow(clippy::many_single_char_names, clippy::blacklisted_name, clippy::redundant_field_names)]
17 fn good(a: &mut u32, b: u32, c: &Bar) {
20 fn good_return_implicit_lt_ref(foo: &Foo) -> &u32 {
24 #[allow(clippy::needless_lifetimes)]
25 fn good_return_explicit_lt_ref<'a>(foo: &'a Foo) -> &'a u32 {
29 fn good_return_implicit_lt_struct(foo: &Foo) -> FooRef {
35 #[allow(clippy::needless_lifetimes)]
36 fn good_return_explicit_lt_struct<'a>(foo: &'a Foo) -> FooRef<'a> {
42 fn bad(x: &u32, y: &Foo, z: &Baz) {
46 fn good(self, a: &mut u32, b: u32, c: &Bar) {
52 fn bad(&self, x: &u32, y: &Foo, z: &Baz) {
55 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) {
69 fn bad2(x: &u32, y: &Foo, z: &Baz) {
74 let (mut foo, bar) = (Foo(0), Bar([0; 24]));
75 let (mut a, b, c, x, y, z) = (0, 0, Bar([0; 24]), 0, Foo(0), 0);
77 good_return_implicit_lt_ref(&y);
78 good_return_explicit_lt_ref(&y);
80 foo.good(&mut a, b, &c);
83 Foo::bad2(&x, &y, &z);
84 bar.good(&mut a, b, &c);
85 Bar::bad2(&x, &y, &z);