Skip to content

Commit 6423fd9

Browse files
committed
rewrite pass-non-c-like-enum-to-c to rmake
1 parent 2f31447 commit 6423fd9

File tree

1 file changed

+19
-0
lines changed
  • tests/run-make/pass-non-c-like-enum-to-c

1 file changed

+19
-0
lines changed

Diff for: tests/run-make/pass-non-c-like-enum-to-c/rmake.rs

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Similar to the `return-non-c-like-enum-from-c` test, where
2+
// the C code is the library, and the Rust code compiles
3+
// into the executable. Once again, enum variants should be treated
4+
// like an union of structs, which should prevent segfaults or
5+
// unexpected results. The only difference with the aforementioned
6+
// test is that the structs are passed into C directly through the
7+
// `tt_add` and `t_add` function calls.
8+
// See https://github.com/rust-lang/rust/issues/68190
9+
10+
//@ ignore-cross-compile
11+
// Reason: the compiled binary is executed
12+
13+
use run_make_support::{build_native_static_lib, run, rustc};
14+
15+
fn main() {
16+
build_native_static_lib("test");
17+
rustc().input("nonclike.rs").arg("-ltest").run();
18+
run("nonclike");
19+
}

0 commit comments

Comments
 (0)