mirror of
https://github.com/async-rs/async-std.git
synced 2025-04-23 16:56:46 +00:00
Merge pull request #1088 from jayvdb/fix-rustdoc-lints
This commit is contained in:
commit
340933b776
3 changed files with 8 additions and 9 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
#![allow(rustdoc::invalid_html_tags)]
|
||||||
//! # Async version of the Rust standard library
|
//! # Async version of the Rust standard library
|
||||||
//!
|
//!
|
||||||
//! `async-std` is a foundation of portable Rust software, a set of minimal and battle-tested
|
//! `async-std` is a foundation of portable Rust software, a set of minimal and battle-tested
|
||||||
|
@ -191,7 +192,7 @@
|
||||||
//! <span
|
//! <span
|
||||||
//! class="module-item stab portability"
|
//! class="module-item stab portability"
|
||||||
//! style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"
|
//! style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"
|
||||||
//! ><code>unstable</code></span>
|
//! > <code>unstable</code> </span>
|
||||||
//! are available only when the `unstable` Cargo feature is enabled:
|
//! are available only when the `unstable` Cargo feature is enabled:
|
||||||
//!
|
//!
|
||||||
//! ```toml
|
//! ```toml
|
||||||
|
@ -204,7 +205,7 @@
|
||||||
//! <span
|
//! <span
|
||||||
//! class="module-item stab portability"
|
//! class="module-item stab portability"
|
||||||
//! style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"
|
//! style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"
|
||||||
//! ><code>attributes</code></span>
|
//! > <code>attributes</code> </span>
|
||||||
//! are available only when the `attributes` Cargo feature is enabled:
|
//! are available only when the `attributes` Cargo feature is enabled:
|
||||||
//!
|
//!
|
||||||
//! ```toml
|
//! ```toml
|
||||||
|
|
|
@ -95,9 +95,9 @@
|
||||||
//! at the same time: In multi-threaded scenarios, you can use two
|
//! at the same time: In multi-threaded scenarios, you can use two
|
||||||
//! kinds of primitives to deal with synchronization:
|
//! kinds of primitives to deal with synchronization:
|
||||||
//! - [memory fences] to ensure memory accesses are made visible to
|
//! - [memory fences] to ensure memory accesses are made visible to
|
||||||
//! other CPUs in the right order.
|
//! other CPUs in the right order.
|
||||||
//! - [atomic operations] to ensure simultaneous access to the same
|
//! - [atomic operations] to ensure simultaneous access to the same
|
||||||
//! memory location doesn't lead to undefined behavior.
|
//! memory location doesn't lead to undefined behavior.
|
||||||
//!
|
//!
|
||||||
//! [prefetching]: https://en.wikipedia.org/wiki/Cache_prefetching
|
//! [prefetching]: https://en.wikipedia.org/wiki/Cache_prefetching
|
||||||
//! [compiler fences]: https://doc.rust-lang.org/std/sync/atomic/fn.compiler_fence.html
|
//! [compiler fences]: https://doc.rust-lang.org/std/sync/atomic/fn.compiler_fence.html
|
||||||
|
|
|
@ -19,11 +19,9 @@ use crate::task::Builder;
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use async_std::task;
|
/// use async_std::task;
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// task::block_on(async {
|
||||||
/// task::block_on(async {
|
/// println!("Hello, world!");
|
||||||
/// println!("Hello, world!");
|
/// })
|
||||||
/// })
|
|
||||||
/// }
|
|
||||||
/// ```
|
/// ```
|
||||||
#[cfg(not(target_os = "unknown"))]
|
#[cfg(not(target_os = "unknown"))]
|
||||||
pub fn block_on<F, T>(future: F) -> T
|
pub fn block_on<F, T>(future: F) -> T
|
||||||
|
|
Loading…
Reference in a new issue