Skip to content

Commit

Permalink
Fix macro-generated docs in join
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Aug 30, 2016
1 parent fd6bc8b commit 8677afc
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions src/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ use core::mem;
use {Future, Poll, IntoFuture};

macro_rules! generate {
($(($Join:ident, $new:ident, <A, $($B:ident),*>),)*) => ($(
/// Future for the `join` combinator, waiting for two futures to
/// complete.
///
/// This is created by this `Future::join` method.
($(
$(#[$doc:meta])*
($Join:ident, $new:ident, <A, $($B:ident),*>),
)*) => ($(
$(#[$doc])*
pub struct $Join<A, $($B),*>
where A: Future,
$($B: Future<Error=A::Error>),*
Expand Down Expand Up @@ -97,9 +97,28 @@ macro_rules! generate {
}

generate! {
/// Future for the `join` combinator, waiting for two futures to
/// complete.
///
/// This is created by this `Future::join` method.
(Join, new, <A, B>),

/// Future for the `join3` combinator, waiting for three futures to
/// complete.
///
/// This is created by this `Future::join3` method.
(Join3, new3, <A, B, C>),

/// Future for the `join4` combinator, waiting for four futures to
/// complete.
///
/// This is created by this `Future::join4` method.
(Join4, new4, <A, B, C, D>),

/// Future for the `join5` combinator, waiting for five futures to
/// complete.
///
/// This is created by this `Future::join5` method.
(Join5, new5, <A, B, C, D, E>),
}

Expand Down

0 comments on commit 8677afc

Please sign in to comment.