1 #![allow(many_single_char_names, blacklisted_name)]
15 fn good(a: &mut u32, b: u32, c: &Bar) {
18 fn good_return_implicit_lt_ref(foo: &Foo) -> &u32 {
22 #[allow(needless_lifetimes)]
23 fn good_return_explicit_lt_ref<'a>(foo: &'a Foo) -> &'a u32 {
27 fn good_return_implicit_lt_struct(foo: &Foo) -> FooRef {
33 #[allow(needless_lifetimes)]
34 fn good_return_explicit_lt_struct<'a>(foo: &'a Foo) -> FooRef<'a> {
40 fn bad(x: &u32, y: &Foo, z: &Baz) {
44 fn good(self, a: &mut u32, b: u32, c: &Bar) {
50 fn bad(&self, x: &u32, y: &Foo, z: &Baz) {
53 fn bad2(x: &u32, y: &Foo, z: &Baz) {
57 impl AsRef<u32> for Foo {
58 fn as_ref(&self) -> &u32 {
64 fn good(&self, a: &mut u32, b: u32, c: &Bar) {
67 fn bad2(x: &u32, y: &Foo, z: &Baz) {
72 let (mut foo, bar) = (Foo(0), Bar([0; 24]));
73 let (mut a, b, c, x, y, z) = (0, 0, Bar([0; 24]), 0, Foo(0), 0);
75 good_return_implicit_lt_ref(&y);
76 good_return_explicit_lt_ref(&y);
78 foo.good(&mut a, b, &c);
81 Foo::bad2(&x, &y, &z);
82 bar.good(&mut a, b, &c);
83 Bar::bad2(&x, &y, &z);