rust: add test case for rust tagged enums

PiperOrigin-RevId: 628050972
Change-Id: I856ffb8f0e5c743d1fecb2e29ce7708f60a58307
diff --git a/test_cases/info_tests/variant/expected/simple_rs.elf_stg b/test_cases/info_tests/variant/expected/simple_rs.elf_stg
new file mode 100644
index 0000000..4621cf8
--- /dev/null
+++ b/test_cases/info_tests/variant/expected/simple_rs.elf_stg
@@ -0,0 +1,33 @@
+version: 0x00000002
+root_id: 0x84ea5130  # interface
+primitive {
+  id: 0x62aebfd4
+  name: "bool"
+  encoding: BOOLEAN
+  bytesize: 0x00000001
+}
+struct_union {
+  id: 0x176387ba
+  kind: STRUCT
+  name: "simple::Foo"
+  definition {
+    bytesize: 12
+  }
+}
+function {
+  id: 0xbb888a50
+  return_type_id: 0x62aebfd4  # bool
+  parameter_id: 0x176387ba  # struct simple::Foo
+}
+elf_symbol {
+  id: 0x4e2f2fc8
+  name: "is_unit"
+  is_defined: true
+  symbol_type: FUNCTION
+  type_id: 0xbb888a50  # bool(struct simple::Foo)
+  full_name: "simple::is_unit"
+}
+interface {
+  id: 0x84ea5130
+  symbol_id: 0x4e2f2fc8  # bool simple::is_unit(struct simple::Foo)
+}
diff --git a/test_cases/info_tests/variant/simple.rs b/test_cases/info_tests/variant/simple.rs
new file mode 100644
index 0000000..5f080ec
--- /dev/null
+++ b/test_cases/info_tests/variant/simple.rs
@@ -0,0 +1,14 @@
+#[repr(u8)]
+pub enum Foo {
+    Unit,
+    TwoU32s(u32, u32),
+    ThreeI16s { x: i16, y: i16, z: i16 },
+}
+
+#[no_mangle]
+pub fn is_unit(foo: Foo) -> bool {
+    match foo {
+        Foo::Unit => true,
+        _ => false,
+    }
+}