-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Misc fixes #11186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc fixes #11186
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(clippy::needless_pass_by_ref_mut)] | ||
|
||
fn fn_val(i: i32) -> i32 { | ||
unimplemented!() | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(clippy::needless_pass_by_ref_mut)] | ||
|
||
use std::future::Future; | ||
|
||
async fn some_async_fn() {} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: non-binding `let` on a future | ||
--> $DIR/let_underscore_future.rs:14:5 | ||
--> $DIR/let_underscore_future.rs:16:5 | ||
| | ||
LL | let _ = some_async_fn(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
@@ -8,28 +8,20 @@ LL | let _ = some_async_fn(); | |
= note: `-D clippy::let-underscore-future` implied by `-D warnings` | ||
|
||
error: non-binding `let` on a future | ||
--> $DIR/let_underscore_future.rs:15:5 | ||
--> $DIR/let_underscore_future.rs:17:5 | ||
| | ||
LL | let _ = custom(); | ||
| ^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: consider awaiting the future or dropping explicitly with `std::mem::drop` | ||
|
||
error: non-binding `let` on a future | ||
--> $DIR/let_underscore_future.rs:19:5 | ||
--> $DIR/let_underscore_future.rs:21:5 | ||
| | ||
LL | let _ = future; | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
= help: consider awaiting the future or dropping explicitly with `std::mem::drop` | ||
|
||
error: this argument is a mutable reference, but not used mutably | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wonder if we can have a CI test to prevent this stuff from happening 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can probably search for |
||
--> $DIR/let_underscore_future.rs:11:35 | ||
| | ||
LL | fn do_something_to_future(future: &mut impl Future<Output = ()>) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&impl Future<Output = ()>` | ||
| | ||
= note: `-D clippy::needless-pass-by-ref-mut` implied by `-D warnings` | ||
|
||
error: aborting due to 4 previous errors | ||
error: aborting due to 3 previous errors | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure we want to move this to pedantic?