From 0ddf113f68783ef05b0245b4b8e97377ad91aa49 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Tue, 3 Aug 2021 23:47:19 +0200 Subject: [PATCH] :art: :rotating_light: cargo ftm and deprecated missing_doc_code_examples --- src/internal.rs | 16 ++++++++-------- src/lib.rs | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/internal.rs b/src/internal.rs index fd683c0..d8f27ba 100644 --- a/src/internal.rs +++ b/src/internal.rs @@ -46,7 +46,7 @@ impl Finish for IResult { /// Contains information on needed data if a parser returned `Incomplete` #[derive(Debug, PartialEq, Eq, Clone, Copy)] -#[allow(missing_doc_code_examples)] +#[allow(rustdoc::missing_doc_code_examples)] pub enum Needed { /// Needs more data, but we do not know how much Unknown, @@ -93,7 +93,7 @@ impl Needed { /// to try other parsers, you were already in the right branch, so the data is invalid /// #[derive(Debug, Clone, PartialEq)] -#[allow(missing_doc_code_examples)] +#[allow(rustdoc::missing_doc_code_examples)] pub enum Err { /// There was not enough data Incomplete(Needed), @@ -299,7 +299,7 @@ impl<'a, I, O, E> Parser for Box + 'a> { } /// Implementation of `Parser::map` -#[allow(missing_doc_code_examples)] +#[allow(rustdoc::missing_doc_code_examples)] pub struct Map { f: F, g: G, @@ -316,7 +316,7 @@ impl<'a, I, O1, O2, E, F: Parser, G: Fn(O1) -> O2> Parser fo } /// Implementation of `Parser::flat_map` -#[allow(missing_doc_code_examples)] +#[allow(rustdoc::missing_doc_code_examples)] pub struct FlatMap { f: F, g: G, @@ -333,7 +333,7 @@ impl<'a, I, O1, O2, E, F: Parser, G: Fn(O1) -> H, H: Parser> } /// Implementation of `Parser::and_then` -#[allow(missing_doc_code_examples)] +#[allow(rustdoc::missing_doc_code_examples)] pub struct AndThen { f: F, g: G, @@ -351,7 +351,7 @@ impl<'a, I, O1, O2, E, F: Parser, G: Parser> Parser { f: F, g: G, @@ -368,7 +368,7 @@ impl<'a, I, O1, O2, E, F: Parser, G: Parser> Parser { f: F, g: G, @@ -389,7 +389,7 @@ impl<'a, I: Clone, O, E: crate::error::ParseError, F: Parser, G: Par } /// Implementation of `Parser::into` -#[allow(missing_doc_code_examples)] +#[allow(rustdoc::missing_doc_code_examples)] pub struct Into, E1, E2: From> { f: F, phantom_out1: core::marker::PhantomData, diff --git a/src/lib.rs b/src/lib.rs index a05ee9d..443fccb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -379,7 +379,7 @@ #![cfg_attr(feature = "docsrs", feature(doc_cfg))] #![cfg_attr(feature = "docsrs", feature(extended_key_value_attributes))] #![deny(missing_docs)] -#![warn(missing_doc_code_examples)] +#![warn(rustdoc::missing_doc_code_examples)] #[cfg(feature = "alloc")] #[macro_use] @@ -397,12 +397,12 @@ doc_comment::doctest!("../README.md"); /// Lib module to re-export everything needed from `std` or `core`/`alloc`. This is how `serde` does /// it, albeit there it is not public. -#[allow(missing_doc_code_examples)] +#[allow(rustdoc::missing_doc_code_examples)] pub mod lib { /// `std` facade allowing `std`/`core` to be interchangeable. Reexports `alloc` crate optionally, /// as well as `core` or `std` #[cfg(not(feature = "std"))] - #[allow(missing_doc_code_examples)] + #[allow(rustdoc::missing_doc_code_examples)] /// internal std exports for no_std compatibility pub mod std { #[doc(hidden)] @@ -424,7 +424,7 @@ pub mod lib { } #[cfg(feature = "std")] - #[allow(missing_doc_code_examples)] + #[allow(rustdoc::missing_doc_code_examples)] /// internal std exports for no_std compatibility pub mod std { #[doc(hidden)]