Skip to content

Commit 6c82372

Browse files
committed
fix doc test
1 parent 3ff9e98 commit 6c82372

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@
138138
//!
139139
//! Call an async function from the main function:
140140
//!
141-
//! ```
141+
#![cfg_attr(feature = "attributes", doc = "```")]
142+
#![cfg_attr(not(feature = "attributes"), doc = "```ignore")]
142143
//! async fn say_hello() {
143144
//! println!("Hello, world!");
144145
//! }
@@ -151,7 +152,8 @@
151152
//!
152153
//! Await two futures concurrently, and return a tuple of their output:
153154
//!
154-
//! ```
155+
#![cfg_attr(feature = "attributes", doc = "```")]
156+
#![cfg_attr(not(feature = "attributes"), doc = "```ignore")]
155157
//! use async_std::prelude::*;
156158
//!
157159
//! #[async_std::main]
@@ -164,7 +166,8 @@
164166
//!
165167
//! Create a UDP server that echoes back each received message to the sender:
166168
//!
167-
//! ```no_run
169+
#![cfg_attr(feature = "attributes", doc = "```no_run")]
170+
#![cfg_attr(not(feature = "attributes"), doc = "```ignore")]
168171
//! use async_std::net::UdpSocket;
169172
//!
170173
//! #[async_std::main]

src/stream/stream/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ extension_trait! {
10111011
10121012
# Examples
10131013
1014-
```ignore
1014+
```
10151015
# fn main() { async_std::task::block_on(async {
10161016
#
10171017
use async_std::prelude::*;
@@ -1044,7 +1044,7 @@ extension_trait! {
10441044
10451045
# Examples
10461046
1047-
```ignore
1047+
```
10481048
# fn main() { async_std::task::block_on(async {
10491049
#
10501050
use async_std::prelude::*;

0 commit comments

Comments
 (0)