File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1+ #![ allow( rustdoc:: invalid_html_tags) ]
12//! # Async version of the Rust standard library
23//!
34//! `async-std` is a foundation of portable Rust software, a set of minimal and battle-tested
191192//! <span
192193//! class="module-item stab portability"
193194//! style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"
194- //! ><code>unstable</code></span>
195+ //! > <code>unstable</code> </span>
195196//! are available only when the `unstable` Cargo feature is enabled:
196197//!
197198//! ```toml
204205//! <span
205206//! class="module-item stab portability"
206207//! style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"
207- //! ><code>attributes</code></span>
208+ //! > <code>attributes</code> </span>
208209//! are available only when the `attributes` Cargo feature is enabled:
209210//!
210211//! ```toml
Original file line number Diff line number Diff line change 9595//! at the same time: In multi-threaded scenarios, you can use two
9696//! kinds of primitives to deal with synchronization:
9797//! - [memory fences] to ensure memory accesses are made visible to
98- //! other CPUs in the right order.
98+ //! other CPUs in the right order.
9999//! - [atomic operations] to ensure simultaneous access to the same
100- //! memory location doesn't lead to undefined behavior.
100+ //! memory location doesn't lead to undefined behavior.
101101//!
102102//! [prefetching]: https://en.wikipedia.org/wiki/Cache_prefetching
103103//! [compiler fences]: https://doc.rust-lang.org/std/sync/atomic/fn.compiler_fence.html
Original file line number Diff line number Diff line change @@ -19,11 +19,9 @@ use crate::task::Builder;
1919/// ```no_run
2020/// use async_std::task;
2121///
22- /// fn main() {
23- /// task::block_on(async {
24- /// println!("Hello, world!");
25- /// })
26- /// }
22+ /// task::block_on(async {
23+ /// println!("Hello, world!");
24+ /// })
2725/// ```
2826#[ cfg( not( target_os = "unknown" ) ) ]
2927pub fn block_on < F , T > ( future : F ) -> T
You can’t perform that action at this time.
0 commit comments