Remove conversion from empty seq to unit struct

This commit is contained in:
David Tolnay
2017-04-09 13:08:05 -07:00
parent cc933b9cdb
commit 1986c17052
2 changed files with 7 additions and 15 deletions
+7 -8
View File
@@ -242,14 +242,6 @@ declare_tests! {
UnitStruct => &[
Token::UnitStruct("UnitStruct"),
],
UnitStruct => &[
Token::Seq(Some(0)),
Token::SeqEnd,
],
UnitStruct => &[
Token::Seq(None),
Token::SeqEnd,
],
}
test_newtype_struct {
NewtypeStruct(1) => &[
@@ -1036,4 +1028,11 @@ declare_error_tests! {
],
Error::Message("invalid type: floating point `0`, expected isize".into()),
}
test_unit_struct_from_seq<UnitStruct> {
&[
Token::Seq(Some(0)),
Token::SeqEnd,
],
Error::Message("invalid type: sequence, expected unit struct UnitStruct".into()),
}
}