Skip to content

Commit 7a949c3

Browse files
committed
fix
1 parent b932571 commit 7a949c3

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

tests/ui/needless_move.fixed

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ fn main() {
5050

5151
// (an async fn is a fn whose body turns into an `async move {}` block, where the `move` kw has
5252
// DUMMY_SP as the Span). It shouldn't trigger the lint.
53-
async fn f() {
54-
}
53+
async fn f() {}
5554

5655
// triggers on move closures and async blocks which do not capture anything
5756
let closure = assert_static(|| {});

tests/ui/needless_move.stderr

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: you seem to use `move`, but the `move` is unnecessary
2-
--> $DIR/needless_move.rs:57:33
2+
--> $DIR/needless_move.rs:56:33
33
|
44
LL | let closure = assert_static(move || {});
55
| -----^^^^^
@@ -11,7 +11,7 @@ LL | let closure = assert_static(move || {});
1111
= help: to override `-D warnings` add `#[allow(clippy::needless_move)]`
1212

1313
error: you seem to use `move`, but the `move` is unnecessary
14-
--> $DIR/needless_move.rs:58:29
14+
--> $DIR/needless_move.rs:57:29
1515
|
1616
LL | let fut = assert_static(async move {});
1717
| ^^^^^^-----^^
@@ -21,7 +21,7 @@ LL | let fut = assert_static(async move {});
2121
= note: there were no captured variables, so the `move` is unnecessary
2222

2323
error: you seem to use `move`, but the `move` is unnecessary
24-
--> $DIR/needless_move.rs:62:33
24+
--> $DIR/needless_move.rs:61:33
2525
|
2626
LL | let closure = assert_static(move || {
2727
| ^----
@@ -35,7 +35,7 @@ LL | | });
3535
= note: there were consumed variables, but no borrowed variables, so the `move` is unnecessary
3636

3737
error: you seem to use `move`, but the `move` is unnecessary
38-
--> $DIR/needless_move.rs:108:29
38+
--> $DIR/needless_move.rs:107:29
3939
|
4040
LL | let fut = assert_static(async move {
4141
| ^ ----- help: remove the `move`
@@ -48,7 +48,7 @@ LL | | });
4848
= note: there were consumed variables, but no borrowed variables, so the `move` is unnecessary
4949

5050
error: you seem to use `move`, but the `move` is unnecessary
51-
--> $DIR/needless_move.rs:145:33
51+
--> $DIR/needless_move.rs:144:33
5252
|
5353
LL | let closure = assert_static(move || {
5454
| ^----
@@ -63,7 +63,7 @@ LL | | });
6363
= note: there were consumed variables, but no borrowed variables, so the `move` is unnecessary
6464

6565
error: you seem to use `move`, but the `move` is unnecessary
66-
--> $DIR/needless_move.rs:159:33
66+
--> $DIR/needless_move.rs:158:33
6767
|
6868
LL | let closure = assert_static(move || {
6969
| ^----
@@ -78,7 +78,7 @@ LL | | });
7878
= note: there were consumed variables, but no borrowed variables, so the `move` is unnecessary
7979

8080
error: you seem to use `move`, but the `move` is unnecessary
81-
--> $DIR/needless_move.rs:174:33
81+
--> $DIR/needless_move.rs:173:33
8282
|
8383
LL | let closure = assert_static(move || {
8484
| ^----
@@ -94,7 +94,7 @@ LL | | });
9494
= note: there were consumed variables, but no borrowed variables, so the `move` is unnecessary
9595

9696
error: you seem to use `move`, but the `move` is unnecessary
97-
--> $DIR/needless_move.rs:193:33
97+
--> $DIR/needless_move.rs:192:33
9898
|
9999
LL | let closure = assert_static(move || {
100100
| ^----
@@ -108,7 +108,7 @@ LL | | });
108108
= note: there were consumed variables, but no borrowed variables, so the `move` is unnecessary
109109

110110
error: you seem to use `move`, but the `move` is unnecessary
111-
--> $DIR/needless_move.rs:231:33
111+
--> $DIR/needless_move.rs:230:33
112112
|
113113
LL | let closure = assert_static(move || {
114114
| ^----

0 commit comments

Comments
 (0)