Catch wrong field names length in serde_test

This commit is contained in:
David Tolnay
2017-11-12 09:52:39 -08:00
parent 98bb02e9b4
commit 436cafb0a3
6 changed files with 44 additions and 23 deletions
+8
View File
@@ -425,6 +425,10 @@ pub enum Token {
/// The header of a struct.
///
/// When testing deserialization, the `len` field must match the number of
/// fields that the struct expects to deserialize. This may be different
/// from the number of fields contained in the input tokens.
///
/// After this header are the fields of the struct, followed by `StructEnd`.
///
/// ```rust
@@ -461,6 +465,10 @@ pub enum Token {
/// The header of a struct variant of an enum.
///
/// When testing deserialization, the `len` field must match the number of
/// fields that the struct variant expects to deserialize. This may be
/// different from the number of fields contained in the input tokens.
///
/// After this header are the fields of the struct variant, followed by
/// `StructVariantEnd`.
///