File tree 3 files changed +8
-9
lines changed
3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change
1
+ #![ allow( rustdoc:: invalid_html_tags) ]
1
2
//! # Async version of the Rust standard library
2
3
//!
3
4
//! `async-std` is a foundation of portable Rust software, a set of minimal and battle-tested
191
192
//! <span
192
193
//! class="module-item stab portability"
193
194
//! 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>
195
196
//! are available only when the `unstable` Cargo feature is enabled:
196
197
//!
197
198
//! ```toml
204
205
//! <span
205
206
//! class="module-item stab portability"
206
207
//! 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>
208
209
//! are available only when the `attributes` Cargo feature is enabled:
209
210
//!
210
211
//! ```toml
Original file line number Diff line number Diff line change 95
95
//! at the same time: In multi-threaded scenarios, you can use two
96
96
//! kinds of primitives to deal with synchronization:
97
97
//! - [memory fences] to ensure memory accesses are made visible to
98
- //! other CPUs in the right order.
98
+ //! other CPUs in the right order.
99
99
//! - [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.
101
101
//!
102
102
//! [prefetching]: https://en.wikipedia.org/wiki/Cache_prefetching
103
103
//! [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;
19
19
/// ```no_run
20
20
/// use async_std::task;
21
21
///
22
- /// fn main() {
23
- /// task::block_on(async {
24
- /// println!("Hello, world!");
25
- /// })
26
- /// }
22
+ /// task::block_on(async {
23
+ /// println!("Hello, world!");
24
+ /// })
27
25
/// ```
28
26
#[ cfg( not( target_os = "unknown" ) ) ]
29
27
pub fn block_on < F , T > ( future : F ) -> T
You can’t perform that action at this time.
0 commit comments