about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-04-25 19:52:17 +0000
committerMichael Goulet <michael@errs.io>2023-04-27 17:18:12 +0000
commitd4200276f2679e2f1be8286ca2b3d0c91bb81efe (patch)
tree08f8529488fe9851f0ca57684724ece0c99833b0 /src
parent6c9249f68935c789231b89c15986795dbc95511e (diff)
downloadrust-d4200276f2679e2f1be8286ca2b3d0c91bb81efe.tar.gz
rust-d4200276f2679e2f1be8286ca2b3d0c91bb81efe.zip
Make clippy happy
Diffstat (limited to 'src')
-rw-r--r--src/tools/clippy/clippy_lints/src/suspicious_operation_groupings.rs2
-rw-r--r--src/tools/clippy/clippy_utils/src/ast_utils.rs2
-rw-r--r--src/tools/clippy/tests/ui/future_not_send.stderr24
3 files changed, 14 insertions, 14 deletions
diff --git a/src/tools/clippy/clippy_lints/src/suspicious_operation_groupings.rs b/src/tools/clippy/clippy_lints/src/suspicious_operation_groupings.rs
index fab8e9c2ec1..e2cdc48b583 100644
--- a/src/tools/clippy/clippy_lints/src/suspicious_operation_groupings.rs
+++ b/src/tools/clippy/clippy_lints/src/suspicious_operation_groupings.rs
@@ -577,7 +577,7 @@ fn ident_difference_expr_with_base_location(
         | (AssignOp(_, _, _), AssignOp(_, _, _))
         | (Assign(_, _, _), Assign(_, _, _))
         | (TryBlock(_), TryBlock(_))
-        | (Await(_), Await(_))
+        | (Await(_, _), Await(_, _))
         | (Async(_, _), Async(_, _))
         | (Block(_, _), Block(_, _))
         | (Closure(_), Closure(_))
diff --git a/src/tools/clippy/clippy_utils/src/ast_utils.rs b/src/tools/clippy/clippy_utils/src/ast_utils.rs
index 1f15598db36..8cc01f1ef97 100644
--- a/src/tools/clippy/clippy_utils/src/ast_utils.rs
+++ b/src/tools/clippy/clippy_utils/src/ast_utils.rs
@@ -143,7 +143,7 @@ pub fn eq_expr(l: &Expr, r: &Expr) -> bool {
         (Paren(l), _) => eq_expr(l, r),
         (_, Paren(r)) => eq_expr(l, r),
         (Err, Err) => true,
-        (Try(l), Try(r)) | (Await(l), Await(r)) => eq_expr(l, r),
+        (Try(l), Try(r)) | (Await(l, _), Await(r, _)) => eq_expr(l, r),
         (Array(l), Array(r)) => over(l, r, |l, r| eq_expr(l, r)),
         (Tup(l), Tup(r)) => over(l, r, |l, r| eq_expr(l, r)),
         (Repeat(le, ls), Repeat(re, rs)) => eq_expr(le, re) && eq_expr(&ls.value, &rs.value),
diff --git a/src/tools/clippy/tests/ui/future_not_send.stderr b/src/tools/clippy/tests/ui/future_not_send.stderr
index 5b6858e4568..5c6348962a5 100644
--- a/src/tools/clippy/tests/ui/future_not_send.stderr
+++ b/src/tools/clippy/tests/ui/future_not_send.stderr
@@ -5,22 +5,22 @@ LL | async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
    |                                                              ^^^^ future returned by `private_future` is not `Send`
    |
 note: future is not `Send` as this value is used across an await
-  --> $DIR/future_not_send.rs:8:19
+  --> $DIR/future_not_send.rs:8:20
    |
 LL | async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
    |                         -- has type `std::rc::Rc<[u8]>` which is not `Send`
 LL |     async { true }.await
-   |                   ^^^^^^ await occurs here, with `rc` maybe used later
+   |                    ^^^^^ await occurs here, with `rc` maybe used later
 LL | }
    | - `rc` is later dropped here
    = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/future_not_send.rs:8:19
+  --> $DIR/future_not_send.rs:8:20
    |
 LL | async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
    |                                       ---- has type `&std::cell::Cell<usize>` which is not `Send`
 LL |     async { true }.await
-   |                   ^^^^^^ await occurs here, with `cell` maybe used later
+   |                    ^^^^^ await occurs here, with `cell` maybe used later
 LL | }
    | - `cell` is later dropped here
    = note: `std::cell::Cell<usize>` doesn't implement `std::marker::Sync`
@@ -33,12 +33,12 @@ LL | pub async fn public_future(rc: Rc<[u8]>) {
    |                                          ^ future returned by `public_future` is not `Send`
    |
 note: future is not `Send` as this value is used across an await
-  --> $DIR/future_not_send.rs:12:19
+  --> $DIR/future_not_send.rs:12:20
    |
 LL | pub async fn public_future(rc: Rc<[u8]>) {
    |                            -- has type `std::rc::Rc<[u8]>` which is not `Send`
 LL |     async { true }.await;
-   |                   ^^^^^^ await occurs here, with `rc` maybe used later
+   |                    ^^^^^ await occurs here, with `rc` maybe used later
 LL | }
    | - `rc` is later dropped here
    = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`
@@ -82,12 +82,12 @@ LL |     async fn private_future(&self) -> usize {
    |                                       ^^^^^ future returned by `private_future` is not `Send`
    |
 note: future is not `Send` as this value is used across an await
-  --> $DIR/future_not_send.rs:35:23
+  --> $DIR/future_not_send.rs:35:24
    |
 LL |     async fn private_future(&self) -> usize {
    |                             ----- has type `&Dummy` which is not `Send`
 LL |         async { true }.await;
-   |                       ^^^^^^ await occurs here, with `&self` maybe used later
+   |                        ^^^^^ await occurs here, with `&self` maybe used later
 LL |         self.rc.len()
 LL |     }
    |     - `&self` is later dropped here
@@ -100,12 +100,12 @@ LL |     pub async fn public_future(&self) {
    |                                       ^ future returned by `public_future` is not `Send`
    |
 note: future is not `Send` as this value is used across an await
-  --> $DIR/future_not_send.rs:40:30
+  --> $DIR/future_not_send.rs:40:31
    |
 LL |     pub async fn public_future(&self) {
    |                                ----- has type `&Dummy` which is not `Send`
 LL |         self.private_future().await;
-   |                              ^^^^^^ await occurs here, with `&self` maybe used later
+   |                               ^^^^^ await occurs here, with `&self` maybe used later
 LL |     }
    |     - `&self` is later dropped here
    = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Sync`
@@ -117,12 +117,12 @@ LL | async fn generic_future<T>(t: T) -> T
    |                                     ^ future returned by `generic_future` is not `Send`
    |
 note: future is not `Send` as this value is used across an await
-  --> $DIR/future_not_send.rs:54:19
+  --> $DIR/future_not_send.rs:54:20
    |
 LL |     let rt = &t;
    |         -- has type `&T` which is not `Send`
 LL |     async { true }.await;
-   |                   ^^^^^^ await occurs here, with `rt` maybe used later
+   |                    ^^^^^ await occurs here, with `rt` maybe used later
 LL |     t
 LL | }
    | - `rt` is later dropped here