Skip to content

Commit 38ef0e0

Browse files
committed
ignore clippy::get_first
1 parent acc521b commit 38ef0e0

File tree

6 files changed

+37
-36
lines changed

6 files changed

+37
-36
lines changed

tests/ui-toml/unwrap_used/unwrap_used.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// compile-flags: --test
22

3-
#![allow(unused_mut, clippy::from_iter_instead_of_collect)]
3+
#![allow(unused_mut, clippy::get_first, clippy::from_iter_instead_of_collect)]
44
#![warn(clippy::unwrap_used)]
55
#![deny(clippy::get_unwrap)]
66

tests/ui/debug_assert_with_mut_call.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![feature(custom_inner_attributes)]
22
#![rustfmt::skip]
33
#![warn(clippy::debug_assert_with_mut_call)]
4-
#![allow(clippy::redundant_closure_call)]
4+
#![allow(clippy::redundant_closure_call, clippy::get_first)]
55

66

77
struct S;

tests/ui/get_unwrap.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-rustfix
22

3-
#![allow(unused_mut, clippy::from_iter_instead_of_collect)]
3+
#![allow(unused_mut, clippy::from_iter_instead_of_collect, clippy::get_first)]
44
#![warn(clippy::unwrap_used)]
55
#![deny(clippy::get_unwrap)]
66

tests/ui/get_unwrap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-rustfix
22

3-
#![allow(unused_mut, clippy::from_iter_instead_of_collect)]
3+
#![allow(unused_mut, clippy::from_iter_instead_of_collect, clippy::get_first)]
44
#![warn(clippy::unwrap_used)]
55
#![deny(clippy::get_unwrap)]
66

tests/ui/needless_lifetimes.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
clippy::boxed_local,
55
clippy::needless_pass_by_value,
66
clippy::unnecessary_wraps,
7-
dyn_drop
7+
dyn_drop,
8+
clippy::get_first
89
)]
910

1011
fn distinct_lifetimes<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: u8) {}

tests/ui/needless_lifetimes.stderr

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,187 +1,187 @@
11
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
2-
--> $DIR/needless_lifetimes.rs:10:1
2+
--> $DIR/needless_lifetimes.rs:11:1
33
|
44
LL | 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

99
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
10-
--> $DIR/needless_lifetimes.rs:12:1
10+
--> $DIR/needless_lifetimes.rs:13:1
1111
|
1212
LL | fn distinct_and_static<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: &'static u8) {}
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

1515
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
16-
--> $DIR/needless_lifetimes.rs:22:1
16+
--> $DIR/needless_lifetimes.rs:23:1
1717
|
1818
LL | fn in_and_out<'a>(x: &'a u8, _y: u8) -> &'a u8 {
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020

2121
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
22-
--> $DIR/needless_lifetimes.rs:56:1
22+
--> $DIR/needless_lifetimes.rs:57:1
2323
|
2424
LL | fn deep_reference_3<'a>(x: &'a u8, _y: u8) -> Result<&'a u8, ()> {
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2626

2727
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
28-
--> $DIR/needless_lifetimes.rs:61:1
28+
--> $DIR/needless_lifetimes.rs:62:1
2929
|
3030
LL | fn where_clause_without_lt<'a, T>(x: &'a u8, _y: u8) -> Result<&'a u8, ()>
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3232

3333
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
34-
--> $DIR/needless_lifetimes.rs:73:1
34+
--> $DIR/needless_lifetimes.rs:74:1
3535
|
3636
LL | fn lifetime_param_2<'a, 'b>(_x: Ref<'a>, _y: &'b u8) {}
3737
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3838

3939
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
40-
--> $DIR/needless_lifetimes.rs:97:1
40+
--> $DIR/needless_lifetimes.rs:98:1
4141
|
4242
LL | fn fn_bound_2<'a, F, I>(_m: Lt<'a, I>, _f: F) -> Lt<'a, I>
4343
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4444

4545
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
46-
--> $DIR/needless_lifetimes.rs:127:5
46+
--> $DIR/needless_lifetimes.rs:128:5
4747
|
4848
LL | fn self_and_out<'s>(&'s self) -> &'s u8 {
4949
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5050

5151
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
52-
--> $DIR/needless_lifetimes.rs:136:5
52+
--> $DIR/needless_lifetimes.rs:137:5
5353
|
5454
LL | fn distinct_self_and_in<'s, 't>(&'s self, _x: &'t u8) {}
5555
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5656

5757
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
58-
--> $DIR/needless_lifetimes.rs:155:1
58+
--> $DIR/needless_lifetimes.rs:156:1
5959
|
6060
LL | fn struct_with_lt<'a>(_foo: Foo<'a>) -> &'a str {
6161
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6262

6363
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
64-
--> $DIR/needless_lifetimes.rs:185:1
64+
--> $DIR/needless_lifetimes.rs:186:1
6565
|
6666
LL | fn trait_obj_elided2<'a>(_arg: &'a dyn Drop) -> &'a str {
6767
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6868

6969
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
70-
--> $DIR/needless_lifetimes.rs:191:1
70+
--> $DIR/needless_lifetimes.rs:192:1
7171
|
7272
LL | fn alias_with_lt<'a>(_foo: FooAlias<'a>) -> &'a str {
7373
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7474

7575
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
76-
--> $DIR/needless_lifetimes.rs:210:1
76+
--> $DIR/needless_lifetimes.rs:211:1
7777
|
7878
LL | fn named_input_elided_output<'a>(_arg: &'a str) -> &str {
7979
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8080

8181
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
82-
--> $DIR/needless_lifetimes.rs:218:1
82+
--> $DIR/needless_lifetimes.rs:219:1
8383
|
8484
LL | fn trait_bound_ok<'a, T: WithLifetime<'static>>(_: &'a u8, _: T) {
8585
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8686

8787
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
88-
--> $DIR/needless_lifetimes.rs:254:1
88+
--> $DIR/needless_lifetimes.rs:255:1
8989
|
9090
LL | fn out_return_type_lts<'a>(e: &'a str) -> Cow<'a> {
9191
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9292

9393
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
94-
--> $DIR/needless_lifetimes.rs:261:9
94+
--> $DIR/needless_lifetimes.rs:262:9
9595
|
9696
LL | fn needless_lt<'a>(x: &'a u8) {}
9797
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9898

9999
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
100-
--> $DIR/needless_lifetimes.rs:265:9
100+
--> $DIR/needless_lifetimes.rs:266:9
101101
|
102102
LL | fn needless_lt<'a>(_x: &'a u8) {}
103103
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104104

105105
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
106-
--> $DIR/needless_lifetimes.rs:278:9
106+
--> $DIR/needless_lifetimes.rs:279:9
107107
|
108108
LL | fn baz<'a>(&'a self) -> impl Foo + 'a {
109109
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110110

111111
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
112-
--> $DIR/needless_lifetimes.rs:310:5
112+
--> $DIR/needless_lifetimes.rs:311:5
113113
|
114114
LL | fn impl_trait_elidable_nested_anonymous_lifetimes<'a>(i: &'a i32, f: impl Fn(&i32) -> &i32) -> &'a i32 {
115115
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116116

117117
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
118-
--> $DIR/needless_lifetimes.rs:319:5
118+
--> $DIR/needless_lifetimes.rs:320:5
119119
|
120120
LL | fn generics_elidable<'a, T: Fn(&i32) -> &i32>(i: &'a i32, f: T) -> &'a i32 {
121121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
122122

123123
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
124-
--> $DIR/needless_lifetimes.rs:331:5
124+
--> $DIR/needless_lifetimes.rs:332:5
125125
|
126126
LL | fn where_clause_elidadable<'a, T>(i: &'a i32, f: T) -> &'a i32
127127
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128128

129129
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
130-
--> $DIR/needless_lifetimes.rs:346:5
130+
--> $DIR/needless_lifetimes.rs:347:5
131131
|
132132
LL | fn pointer_fn_elidable<'a>(i: &'a i32, f: fn(&i32) -> &i32) -> &'a i32 {
133133
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134134

135135
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
136-
--> $DIR/needless_lifetimes.rs:359:5
136+
--> $DIR/needless_lifetimes.rs:360:5
137137
|
138138
LL | fn nested_fn_pointer_3<'a>(_: &'a i32) -> fn(fn(&i32) -> &i32) -> i32 {
139139
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140140

141141
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
142-
--> $DIR/needless_lifetimes.rs:362:5
142+
--> $DIR/needless_lifetimes.rs:363:5
143143
|
144144
LL | fn nested_fn_pointer_4<'a>(_: &'a i32) -> impl Fn(fn(&i32)) {
145145
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146146

147147
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
148-
--> $DIR/needless_lifetimes.rs:384:9
148+
--> $DIR/needless_lifetimes.rs:385:9
149149
|
150150
LL | fn implicit<'a>(&'a self) -> &'a () {
151151
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
152152

153153
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
154-
--> $DIR/needless_lifetimes.rs:387:9
154+
--> $DIR/needless_lifetimes.rs:388:9
155155
|
156156
LL | fn implicit_mut<'a>(&'a mut self) -> &'a () {
157157
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
158158

159159
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
160-
--> $DIR/needless_lifetimes.rs:398:9
160+
--> $DIR/needless_lifetimes.rs:399:9
161161
|
162162
LL | fn lifetime_elsewhere<'a>(self: Box<Self>, here: &'a ()) -> &'a () {
163163
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
164164

165165
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
166-
--> $DIR/needless_lifetimes.rs:404:9
166+
--> $DIR/needless_lifetimes.rs:405:9
167167
|
168168
LL | fn implicit<'a>(&'a self) -> &'a ();
169169
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
170170

171171
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
172-
--> $DIR/needless_lifetimes.rs:405:9
172+
--> $DIR/needless_lifetimes.rs:406:9
173173
|
174174
LL | fn implicit_provided<'a>(&'a self) -> &'a () {
175175
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
176176

177177
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
178-
--> $DIR/needless_lifetimes.rs:414:9
178+
--> $DIR/needless_lifetimes.rs:415:9
179179
|
180180
LL | fn lifetime_elsewhere<'a>(self: Box<Self>, here: &'a ()) -> &'a ();
181181
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
182182

183183
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
184-
--> $DIR/needless_lifetimes.rs:415:9
184+
--> $DIR/needless_lifetimes.rs:416:9
185185
|
186186
LL | fn lifetime_elsewhere_provided<'a>(self: Box<Self>, here: &'a ()) -> &'a () {
187187
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)