Add a macro conditional on integer128 support

This commit is contained in:
David Tolnay 2018-05-19 15:13:13 -07:00
parent 922fadf7e3
commit 5510f758f8
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 18 additions and 0 deletions

15
serde/src/integer128.rs Normal file
View File

@ -0,0 +1,15 @@
/// TODO: rustdoc
#[cfg(integer128)]
#[macro_export]
macro_rules! serde_if_integer128 {
($($tt:tt)*) => {
$($tt)*
};
}
#[cfg(not(integer128))]
#[macro_export]
#[doc(hidden)]
macro_rules! serde_if_integer128 {
($($tt:tt)*) => {};
}

View File

@ -222,6 +222,9 @@ mod lib {
#[macro_use]
mod macros;
#[macro_use]
mod integer128;
pub mod de;
pub mod ser;