fix: Added missing enum tuple variant check and error
This commit is contained in:
12
tests/ui/tuple_enum_variant.rs
Normal file
12
tests/ui/tuple_enum_variant.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use lua_typed::Typed;
|
||||
|
||||
#[derive(Typed)]
|
||||
#[serde(tag = "tag")]
|
||||
enum Test {
|
||||
A,
|
||||
B(String),
|
||||
C(u8),
|
||||
D { test: f32 },
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
11
tests/ui/tuple_enum_variant.stderr
Normal file
11
tests/ui/tuple_enum_variant.stderr
Normal file
@@ -0,0 +1,11 @@
|
||||
error: Tuple structs/variants are currently not supported by Typed
|
||||
--> tests/ui/tuple_enum_variant.rs:7:6
|
||||
|
|
||||
7 | B(String),
|
||||
| ^^^^^^^^
|
||||
|
||||
error: Tuple structs/variants are currently not supported by Typed
|
||||
--> tests/ui/tuple_enum_variant.rs:8:6
|
||||
|
|
||||
8 | C(u8),
|
||||
| ^^^^
|
||||
@@ -1,4 +1,4 @@
|
||||
error: Tuple structs are not supported by Typed
|
||||
error: Tuple structs/variants are currently not supported by Typed
|
||||
--> tests/ui/tuple_struct.rs:4:16
|
||||
|
|
||||
4 | pub struct Test(u8);
|
||||
|
||||
Reference in New Issue
Block a user