6 /* This is the code generated by cbindgen 0.12.1 for the `enum TT`
7 * type in nonclike.rs . */
12 typedef uint8_t TT_Tag;
26 /* This is the code generated by cbindgen 0.12.1 for the `enum T` type
32 typedef uint8_t T_Tag;
45 /* These symbols are defined by the Rust staticlib built from
47 extern uint64_t t_add(T a, T b);
48 extern uint64_t tt_add(TT a, TT b);
50 int main(int argc, char *argv[]) {
51 (void)argc; (void)argv;
53 /* This example works. */
54 TT xx = { .tag = AA, .aa = { ._0 = 1, ._1 = 2 } };
55 TT yy = { .tag = AA, .aa = { ._0 = 10, ._1 = 20 } };
56 uint64_t rr = tt_add(xx, yy);
59 /* This one used to return an incorrect result (see issue #68190). */
60 T x = { .tag = A, .a = { ._0 = 1 } };
61 T y = { .tag = A, .a = { ._0 = 10 } };
62 uint64_t r = t_add(x, y);