Skip to content

Commit a703a82

Browse files
committed
Auto merge of rust-lang#94088 - oli-obk:revert, r=jackh726
Revert rust-lang#91403 fixes rust-lang#94004 r? `@pnkfelix` `@cjgillot`
2 parents 9af2be8 + 4abaa02 commit a703a82

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed

tests/ui/manual_async_fn.fixed

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ fn elided_not_bound(_: &i32) -> impl Future<Output = i32> {
8080
async { 42 }
8181
}
8282

83-
#[allow(clippy::needless_lifetimes)]
8483
async fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> i32 { 42 }
8584

8685
// should be ignored

tests/ui/manual_async_fn.rs

-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ fn elided_not_bound(_: &i32) -> impl Future<Output = i32> {
9898
async { 42 }
9999
}
100100

101-
#[allow(clippy::needless_lifetimes)]
102101
fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> + 'a + 'b {
103102
async { 42 }
104103
}

tests/ui/manual_async_fn.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ LL | fn elided(_: &i32) -> impl Future<Output = i32> + '_ { 42 }
140140
| ~~~~~~
141141

142142
error: this function can be simplified using the `async fn` syntax
143-
--> $DIR/manual_async_fn.rs:102:1
143+
--> $DIR/manual_async_fn.rs:101:1
144144
|
145145
LL | fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> + 'a + 'b {
146146
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/needless_lifetimes.stderr

+1-7
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ error: explicit lifetimes given in parameter types where they could be elided (o
1818
LL | fn in_and_out<'a>(x: &'a u8, _y: u8) -> &'a u8 {
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020

21-
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:37:1
23-
|
24-
LL | async fn func<'a>(args: &[&'a str]) -> Option<&'a str> {
25-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26-
2721
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
2822
--> $DIR/needless_lifetimes.rs:56:1
2923
|
@@ -198,5 +192,5 @@ error: explicit lifetimes given in parameter types where they could be elided (o
198192
LL | fn lifetime_elsewhere_provided<'a>(self: Box<Self>, here: &'a ()) -> &'a () {
199193
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
200194

201-
error: aborting due to 33 previous errors
195+
error: aborting due to 32 previous errors
202196

0 commit comments

Comments
 (0)