Skip to content

Commit 31cd65f

Browse files
committed
Fix std::future::from_generator documentation
This function takes a generator and wraps it in a future, not vice-versa.
1 parent 19f8958 commit 31cd65f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/future.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use core::ops::{Drop, Generator, GeneratorState};
1111
#[doc(inline)]
1212
pub use core::future::*;
1313

14-
/// Wrap a future in a generator.
14+
/// Wrap a generator in a future.
1515
///
1616
/// This function returns a `GenFuture` underneath, but hides it in `impl Trait` to give
1717
/// better error messages (`impl Future` rather than `GenFuture<[closure.....]>`).

0 commit comments

Comments
 (0)