1
1
error: 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
3
3
|
4
4
LL | fn distinct_lifetimes<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: u8) {}
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
|
7
7
= note: `-D clippy::needless-lifetimes` implied by `-D warnings`
8
8
9
9
error: 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
11
11
|
12
12
LL | fn distinct_and_static<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: &'static u8) {}
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
14
15
15
error: 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
17
17
|
18
18
LL | / fn in_and_out<'a>(x: &'a u8, _y: u8) -> &'a u8 {
19
19
LL | | x
20
20
LL | | }
21
21
| |_^
22
22
23
23
error: 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
25
25
|
26
26
LL | / fn deep_reference_3<'a>(x: &'a u8, _y: u8) -> Result<&'a u8, ()> {
27
27
LL | | Ok(x)
28
28
LL | | }
29
29
| |_^
30
30
31
31
error: 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
33
33
|
34
34
LL | / fn where_clause_without_lt<'a, T>(x: &'a u8, _y: u8) -> Result<&'a u8, ()>
35
35
LL | | where
@@ -40,13 +40,13 @@ LL | | }
40
40
| |_^
41
41
42
42
error: 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
44
44
|
45
45
LL | fn lifetime_param_2<'a, 'b>(_x: Ref<'a>, _y: &'b u8) {}
46
46
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47
47
48
48
error: 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
50
50
|
51
51
LL | / fn fn_bound_2<'a, F, I>(_m: Lt<'a, I>, _f: F) -> Lt<'a, I>
52
52
LL | | where
@@ -57,61 +57,61 @@ LL | | }
57
57
| |_^
58
58
59
59
error: 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
61
61
|
62
62
LL | / fn self_and_out<'s>(&'s self) -> &'s u8 {
63
63
LL | | &self.x
64
64
LL | | }
65
65
| |_____^
66
66
67
67
error: 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
69
69
|
70
70
LL | fn distinct_self_and_in<'s, 't>(&'s self, _x: &'t u8) {}
71
71
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
72
73
73
error: 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
75
75
|
76
76
LL | / fn struct_with_lt<'a>(_foo: Foo<'a>) -> &'a str {
77
77
LL | | unimplemented!()
78
78
LL | | }
79
79
| |_^
80
80
81
81
error: 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
83
83
|
84
84
LL | / fn trait_obj_elided2<'a>(_arg: &'a Drop) -> &'a str {
85
85
LL | | unimplemented!()
86
86
LL | | }
87
87
| |_^
88
88
89
89
error: 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
91
91
|
92
92
LL | / fn alias_with_lt<'a>(_foo: FooAlias<'a>) -> &'a str {
93
93
LL | | unimplemented!()
94
94
LL | | }
95
95
| |_^
96
96
97
97
error: 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
99
99
|
100
100
LL | / fn named_input_elided_output<'a>(_arg: &'a str) -> &str {
101
101
LL | | unimplemented!()
102
102
LL | | }
103
103
| |_^
104
104
105
105
error: 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
107
107
|
108
108
LL | / fn trait_bound_ok<'a, T: WithLifetime<'static>>(_: &'a u8, _: T) {
109
109
LL | | unimplemented!()
110
110
LL | | }
111
111
| |_^
112
112
113
113
error: 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
115
115
|
116
116
LL | / fn out_return_type_lts<'a>(e: &'a str) -> Cow<'a> {
117
117
LL | | unimplemented!()
0 commit comments