]> git.lizzy.rs Git - rust.git/blob - tests/ui/let_underscore_future.rs
Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup
[rust.git] / tests / ui / let_underscore_future.rs
1 use std::future::Future;
2
3 async fn some_async_fn() {}
4
5 fn sync_side_effects() {}
6 fn custom() -> impl Future<Output = ()> {
7     sync_side_effects();
8     async {}
9 }
10
11 fn do_something_to_future(future: &mut impl Future<Output = ()>) {}
12
13 fn main() {
14     let _ = some_async_fn();
15     let _ = custom();
16
17     let mut future = some_async_fn();
18     do_something_to_future(&mut future);
19     let _ = future;
20 }