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 Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments