diff --git a/tests/ui/needless_move.fixed b/tests/ui/needless_move.fixed index 6c4993f9a614..2deaf5cb013c 100644 --- a/tests/ui/needless_move.fixed +++ b/tests/ui/needless_move.fixed @@ -50,8 +50,7 @@ fn main() { // (an async fn is a fn whose body turns into an `async move {}` block, where the `move` kw has // DUMMY_SP as the Span). It shouldn't trigger the lint. - async fn f() { - } + async fn f() {} // triggers on move closures and async blocks which do not capture anything let closure = assert_static(|| {}); diff --git a/tests/ui/needless_move.stderr b/tests/ui/needless_move.stderr index 176446107d7a..2b3124cfc8e8 100644 --- a/tests/ui/needless_move.stderr +++ b/tests/ui/needless_move.stderr @@ -1,5 +1,5 @@ error: you seem to use `move`, but the `move` is unnecessary - --> $DIR/needless_move.rs:57:33 + --> $DIR/needless_move.rs:56:33 | LL | let closure = assert_static(move || {}); | -----^^^^^ @@ -11,7 +11,7 @@ LL | let closure = assert_static(move || {}); = help: to override `-D warnings` add `#[allow(clippy::needless_move)]` error: you seem to use `move`, but the `move` is unnecessary - --> $DIR/needless_move.rs:58:29 + --> $DIR/needless_move.rs:57:29 | LL | let fut = assert_static(async move {}); | ^^^^^^-----^^ @@ -21,7 +21,7 @@ LL | let fut = assert_static(async move {}); = note: there were no captured variables, so the `move` is unnecessary error: you seem to use `move`, but the `move` is unnecessary - --> $DIR/needless_move.rs:62:33 + --> $DIR/needless_move.rs:61:33 | LL | let closure = assert_static(move || { | ^---- @@ -35,7 +35,7 @@ LL | | }); = note: there were consumed variables, but no borrowed variables, so the `move` is unnecessary error: you seem to use `move`, but the `move` is unnecessary - --> $DIR/needless_move.rs:108:29 + --> $DIR/needless_move.rs:107:29 | LL | let fut = assert_static(async move { | ^ ----- help: remove the `move` @@ -48,7 +48,7 @@ LL | | }); = note: there were consumed variables, but no borrowed variables, so the `move` is unnecessary error: you seem to use `move`, but the `move` is unnecessary - --> $DIR/needless_move.rs:145:33 + --> $DIR/needless_move.rs:144:33 | LL | let closure = assert_static(move || { | ^---- @@ -63,7 +63,7 @@ LL | | }); = note: there were consumed variables, but no borrowed variables, so the `move` is unnecessary error: you seem to use `move`, but the `move` is unnecessary - --> $DIR/needless_move.rs:159:33 + --> $DIR/needless_move.rs:158:33 | LL | let closure = assert_static(move || { | ^---- @@ -78,7 +78,7 @@ LL | | }); = note: there were consumed variables, but no borrowed variables, so the `move` is unnecessary error: you seem to use `move`, but the `move` is unnecessary - --> $DIR/needless_move.rs:174:33 + --> $DIR/needless_move.rs:173:33 | LL | let closure = assert_static(move || { | ^---- @@ -94,7 +94,7 @@ LL | | }); = note: there were consumed variables, but no borrowed variables, so the `move` is unnecessary error: you seem to use `move`, but the `move` is unnecessary - --> $DIR/needless_move.rs:193:33 + --> $DIR/needless_move.rs:192:33 | LL | let closure = assert_static(move || { | ^---- @@ -108,7 +108,7 @@ LL | | }); = note: there were consumed variables, but no borrowed variables, so the `move` is unnecessary error: you seem to use `move`, but the `move` is unnecessary - --> $DIR/needless_move.rs:231:33 + --> $DIR/needless_move.rs:230:33 | LL | let closure = assert_static(move || { | ^----