Fix "variable does not need to be mutable" warning

This commit is contained in:
David Tolnay
2016-09-02 11:42:26 -07:00
parent 248d937f9a
commit 14446af537
2 changed files with 44 additions and 6 deletions
+10
View File
@@ -187,6 +187,16 @@ fn test_gen() {
#[serde(bound(deserialize = "T::Owned: Deserialize"))]
struct CowT<'a, T: ?Sized + 'a + ToOwned>(Cow<'a, T>);
assert::<CowT<str>>();
#[derive(Serialize, Deserialize)]
struct EmptyStruct {}
assert::<EmptyStruct>();
#[derive(Serialize, Deserialize)]
enum EmptyEnumVariant {
EmptyStruct {},
}
assert::<EmptyEnumVariant>();
}
//////////////////////////////////////////////////////////////////////////