diff options
Diffstat (limited to 'tests/ui/let_underscore_future.rs')
| -rw-r--r-- | tests/ui/let_underscore_future.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/ui/let_underscore_future.rs b/tests/ui/let_underscore_future.rs index d8f54cdca91..873ae667ab7 100644 --- a/tests/ui/let_underscore_future.rs +++ b/tests/ui/let_underscore_future.rs @@ -1,5 +1,5 @@ use std::future::Future; - +//@no-rustfix async fn some_async_fn() {} fn sync_side_effects() {} @@ -9,12 +9,17 @@ fn custom() -> impl Future<Output = ()> { } fn do_something_to_future(future: &mut impl Future<Output = ()>) {} +//~^ ERROR: this argument is a mutable reference, but not used mutably +//~| NOTE: `-D clippy::needless-pass-by-ref-mut` implied by `-D warnings` fn main() { let _ = some_async_fn(); + //~^ ERROR: non-binding `let` on a future let _ = custom(); + //~^ ERROR: non-binding `let` on a future let mut future = some_async_fn(); do_something_to_future(&mut future); let _ = future; + //~^ ERROR: non-binding `let` on a future } |
