mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
chore: deny warnings for doc tests (#1539)
This commit is contained in:
@@ -6,7 +6,10 @@
|
||||
unreachable_pub
|
||||
)]
|
||||
#![deny(intra_doc_link_resolution_failure)]
|
||||
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
|
||||
#![doc(test(
|
||||
no_crate_inject,
|
||||
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
||||
))]
|
||||
|
||||
//! Asynchronous synchronization primitives.
|
||||
//!
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
//! use tokio::sync::watch;
|
||||
//!
|
||||
//! # async fn dox() -> Result<(), Box<dyn std::error::Error>> {
|
||||
//! let (mut tx, mut rx) = watch::channel("hello");
|
||||
//! let (tx, mut rx) = watch::channel("hello");
|
||||
//!
|
||||
//! tokio::spawn(async move {
|
||||
//! while let Some(value) = rx.recv().await {
|
||||
@@ -172,7 +172,7 @@ const CLOSED: usize = 1;
|
||||
/// use tokio::sync::watch;
|
||||
///
|
||||
/// # async fn dox() -> Result<(), Box<dyn std::error::Error>> {
|
||||
/// let (mut tx, mut rx) = watch::channel("hello");
|
||||
/// let (tx, mut rx) = watch::channel("hello");
|
||||
///
|
||||
/// tokio::spawn(async move {
|
||||
/// while let Some(value) = rx.recv().await {
|
||||
|
||||
Reference in New Issue
Block a user