pub fn join<Fut1, Fut2>(future1: Fut1, future2: Fut2) -> Join<Fut1, Fut2>
where
    Fut1: Future,
    Fut2: Future,
{
    assert_future::<(Fut1::Output, Fut2::Output), _>(Join::new(future1, future2))
}
Joins the result of two futures, waiting for them both to complete.

This function will return a new future which awaits both futures to
complete. The returned future will finish with a tuple of both results.

Note that this function consumes the passed futures and returns a
wrapped version of it.

# Examples

```
# futures::executor::block_on(async {
use futures::future;

let a = async { 1 };
let b = async { 2 };
let pair = future::join(a, b);

assert_eq!(pair.await, (1, 2));
# });
```
futures-util/src/future/join.rs