mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-05-10 05:17:55 +00:00
fdc36e5c06
error[E0425]: cannot find value `__e` in this scope
--> test_suite/tests/regression/issue2846.rs:12:19
|
12 | declare_in_macro!("with");
| ^^^^^^ not found in this scope
24 lines
437 B
Rust
24 lines
437 B
Rust
#![allow(clippy::trivially_copy_pass_by_ref)]
|
|
|
|
use serde_derive::Deserialize;
|
|
|
|
macro_rules! declare_in_macro {
|
|
($with:literal) => {
|
|
#[derive(Deserialize)]
|
|
pub struct S(#[serde(with = $with)] 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!()
|
|
}
|
|
}
|