Merge pull request #1617 from arilotter/master

Fix unused variable warning when field of adjacently tagged enum is skipped
This commit is contained in:
David Tolnay 2019-09-15 23:51:39 -07:00 committed by GitHub
commit 8dfb4cd02f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -720,6 +720,8 @@ fn serialize_adjacently_tagged_variant(
where
__S: _serde::Serializer,
{
// Some members of this tuple will be unused if they're `skip_serializing`
#[allow(unused_variables)]
let (#(#fields_ident,)*) = self.data;
#inner
}