diff options
| author | bors <bors@rust-lang.org> | 2015-01-17 20:31:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-17 20:31:08 +0000 |
| commit | f4f10dba2975b51c2d2c92157018db3ac13d4d4a (patch) | |
| tree | 54bad6d9f9d3472c424b02ec91ff508a81ea1ffa /src/libstd/sync | |
| parent | 89c4e3792ddc5b45706ea0e919806a248f7a87c3 (diff) | |
| parent | 6553c0f5eb7cb903b698431556ade4e954dcb4e6 (diff) | |
| download | rust-f4f10dba2975b51c2d2c92157018db3ac13d4d4a.tar.gz rust-f4f10dba2975b51c2d2c92157018db3ac13d4d4a.zip | |
auto merge of #21300 : steveklabnik/rust/rollup, r=steveklabnik
manual rollup to fix some conflicts and diagnose why the test is failing...
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/future.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/libstd/sync/future.rs b/src/libstd/sync/future.rs index 568c24446e7..36bbc5ff5b4 100644 --- a/src/libstd/sync/future.rs +++ b/src/libstd/sync/future.rs @@ -11,14 +11,18 @@ //! A type representing values that may be computed concurrently and operations //! for working with them. //! -//! # Example +//! # Examples //! -//! ```rust +//! ``` //! use std::sync::Future; -//! # fn fib(n: uint) -> uint {42}; -//! # fn make_a_sandwich() {}; -//! let mut delayed_fib = Future::spawn(move|| { fib(5000) }); -//! make_a_sandwich(); +//! +//! // a fake, for now +//! fn fib(n: u32) -> u32 { 42 }; +//! +//! let mut delayed_fib = Future::spawn(move || fib(5000)); +//! +//! // do stuff... +//! //! println!("fib(5000) = {}", delayed_fib.get()) //! ``` |
