Skip to content

Avoid doctest errors #677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@
//!
//! Call an async function from the main function:
//!
//! ```
#![cfg_attr(feature = "attributes", doc = "```")]
#![cfg_attr(not(feature = "attributes"), doc = "```rust,ignore")]
//! async fn say_hello() {
//! println!("Hello, world!");
//! }
Expand All @@ -151,7 +152,8 @@
//!
//! Await two futures concurrently, and return a tuple of their output:
//!
//! ```
#![cfg_attr(all(feature = "unstable", feature = "attributes"), doc = "```")]
#![cfg_attr(not(all(feature = "unstable", feature = "attributes")), doc = "```rust,ignore")]
//! use async_std::prelude::*;
//!
//! #[async_std::main]
Expand All @@ -164,7 +166,8 @@
//!
//! Create a UDP server that echoes back each received message to the sender:
//!
//! ```no_run
#![cfg_attr(feature = "attributes", doc = "```no_run")]
#![cfg_attr(not(feature = "attributes"), doc = "```rust,ignore")]
//! use async_std::net::UdpSocket;
//!
//! #[async_std::main]
Expand Down