mirror of
https://github.com/serde-rs/serde.git
synced 2025-09-27 13:00:49 +00:00
28 lines
515 B
Rust
28 lines
515 B
Rust
#![allow(clippy::trivially_copy_pass_by_ref, dead_code)]
|
|
|
|
use serde_derive::Deserialize;
|
|
|
|
macro_rules! declare_in_macro {
|
|
($with:literal) => {
|
|
#[derive(Deserialize)]
|
|
pub struct S(
|
|
#[serde(with = $with)]
|
|
#[allow(dead_code)]
|
|
i32,
|
|
);
|
|
};
|
|
}
|
|
|
|
declare_in_macro!("with");
|
|
|
|
mod with {
|
|
use serde::Deserializer;
|
|
|
|
pub fn deserialize<'de, D>(_: D) -> Result<i32, D::Error>
|
|
where
|
|
D: Deserializer<'de>,
|
|
{
|
|
unimplemented!()
|
|
}
|
|
}
|