Skip to content

Commit 7274591

Browse files
authored
Rollup merge of rust-lang#57867 - Aaron1011:fix/gen-future-doc, r=Centril
Fix std::future::from_generator documentation This function takes a generator and wraps it in a future, not vice-versa.
2 parents 1a3b3d4 + 31cd65f commit 7274591

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: 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)