Add regression test for issue 2846
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
This commit is contained in:
parent
49e11ce1ba
commit
fdc36e5c06
23
test_suite/tests/regression/issue2846.rs
Normal file
23
test_suite/tests/regression/issue2846.rs
Normal file
@ -0,0 +1,23 @@
|
||||
#![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!()
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user