Macro to ignore tokens in doc test
This commit is contained in:
parent
995f2b3f76
commit
467b5fc595
@ -329,3 +329,10 @@ macro_rules! __serialize_unimplemented {
|
||||
)*
|
||||
};
|
||||
}
|
||||
|
||||
/// Used only by Serde doc tests. Not public API.
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
macro_rules! __serde_ignore_tokens {
|
||||
($($tt:tt)+) => {}
|
||||
}
|
||||
|
@ -35,9 +35,9 @@ use ser::{self, Serialize, SerializeSeq, SerializeTuple, SerializeTupleStruct,
|
||||
/// -> Result<Self::SerializeSeq, Error> {
|
||||
/// // Given Impossible cannot be instantiated, the only
|
||||
/// // thing we can do here is to return an error.
|
||||
/// # macro_rules! ellipses { () => {
|
||||
/// # __serde_ignore_tokens! {
|
||||
/// Err(...)
|
||||
/// # } }
|
||||
/// # }
|
||||
/// # unimplemented!()
|
||||
/// }
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user