11error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
2- --> $DIR/lifetimes .rs:4:1
2+ --> $DIR/needless_lifetimes .rs:4:1
33 |
44LL | fn distinct_lifetimes<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: u8) {}
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66 |
77 = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
88
99error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
10- --> $DIR/lifetimes .rs:6:1
10+ --> $DIR/needless_lifetimes .rs:6:1
1111 |
1212LL | fn distinct_and_static<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: &'static u8) {}
1313 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414
1515error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
16- --> $DIR/lifetimes .rs:16:1
16+ --> $DIR/needless_lifetimes .rs:16:1
1717 |
1818LL | / fn in_and_out<'a>(x: &'a u8, _y: u8) -> &'a u8 {
1919LL | | x
2020LL | | }
2121 | |_^
2222
2323error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
24- --> $DIR/lifetimes .rs:45:1
24+ --> $DIR/needless_lifetimes .rs:45:1
2525 |
2626LL | / fn deep_reference_3<'a>(x: &'a u8, _y: u8) -> Result<&'a u8, ()> {
2727LL | | Ok(x)
2828LL | | }
2929 | |_^
3030
3131error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
32- --> $DIR/lifetimes .rs:50:1
32+ --> $DIR/needless_lifetimes .rs:50:1
3333 |
3434LL | / fn where_clause_without_lt<'a, T>(x: &'a u8, _y: u8) -> Result<&'a u8, ()>
3535LL | | where
@@ -40,13 +40,13 @@ LL | | }
4040 | |_^
4141
4242error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
43- --> $DIR/lifetimes .rs:62:1
43+ --> $DIR/needless_lifetimes .rs:62:1
4444 |
4545LL | fn lifetime_param_2<'a, 'b>(_x: Ref<'a>, _y: &'b u8) {}
4646 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4747
4848error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
49- --> $DIR/lifetimes .rs:86:1
49+ --> $DIR/needless_lifetimes .rs:86:1
5050 |
5151LL | / fn fn_bound_2<'a, F, I>(_m: Lt<'a, I>, _f: F) -> Lt<'a, I>
5252LL | | where
@@ -57,61 +57,61 @@ LL | | }
5757 | |_^
5858
5959error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
60- --> $DIR/lifetimes .rs:120:5
60+ --> $DIR/needless_lifetimes .rs:120:5
6161 |
6262LL | / fn self_and_out<'s>(&'s self) -> &'s u8 {
6363LL | | &self.x
6464LL | | }
6565 | |_____^
6666
6767error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
68- --> $DIR/lifetimes .rs:129:5
68+ --> $DIR/needless_lifetimes .rs:129:5
6969 |
7070LL | fn distinct_self_and_in<'s, 't>(&'s self, _x: &'t u8) {}
7171 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7272
7373error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
74- --> $DIR/lifetimes .rs:148:1
74+ --> $DIR/needless_lifetimes .rs:148:1
7575 |
7676LL | / fn struct_with_lt<'a>(_foo: Foo<'a>) -> &'a str {
7777LL | | unimplemented!()
7878LL | | }
7979 | |_^
8080
8181error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
82- --> $DIR/lifetimes .rs:178:1
82+ --> $DIR/needless_lifetimes .rs:178:1
8383 |
8484LL | / fn trait_obj_elided2<'a>(_arg: &'a Drop) -> &'a str {
8585LL | | unimplemented!()
8686LL | | }
8787 | |_^
8888
8989error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
90- --> $DIR/lifetimes .rs:184:1
90+ --> $DIR/needless_lifetimes .rs:184:1
9191 |
9292LL | / fn alias_with_lt<'a>(_foo: FooAlias<'a>) -> &'a str {
9393LL | | unimplemented!()
9494LL | | }
9595 | |_^
9696
9797error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
98- --> $DIR/lifetimes .rs:203:1
98+ --> $DIR/needless_lifetimes .rs:203:1
9999 |
100100LL | / fn named_input_elided_output<'a>(_arg: &'a str) -> &str {
101101LL | | unimplemented!()
102102LL | | }
103103 | |_^
104104
105105error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
106- --> $DIR/lifetimes .rs:211:1
106+ --> $DIR/needless_lifetimes .rs:211:1
107107 |
108108LL | / fn trait_bound_ok<'a, T: WithLifetime<'static>>(_: &'a u8, _: T) {
109109LL | | unimplemented!()
110110LL | | }
111111 | |_^
112112
113113error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
114- --> $DIR/lifetimes .rs:247:1
114+ --> $DIR/needless_lifetimes .rs:247:1
115115 |
116116LL | / fn out_return_type_lts<'a>(e: &'a str) -> Cow<'a> {
117117LL | | unimplemented!()
0 commit comments