mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-17 17:21:04 +00:00
Test for pub(restricted)
This commit is contained in:
@@ -578,6 +578,16 @@ fn test_gen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assert_ser::<EmptyAdjacentlyTagged>();
|
assert_ser::<EmptyAdjacentlyTagged>();
|
||||||
|
|
||||||
|
mod restricted {
|
||||||
|
mod inner {
|
||||||
|
#[derive(Serialize, Deserialize)]
|
||||||
|
struct Restricted {
|
||||||
|
pub(super) a: usize,
|
||||||
|
pub(in super::inner) b: usize,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user