Skip to content

Commit fd2ca09

Browse files
committed
rewrite return-non-c-like-enum-from-c to rmake
1 parent 11e5724 commit fd2ca09

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ run-make/no-alloc-shim/Makefile
6868
run-make/no-builtins-attribute/Makefile
6969
run-make/no-duplicate-libs/Makefile
7070
run-make/panic-abort-eh_frame/Makefile
71-
run-make/pass-non-c-like-enum-to-c/Makefile
7271
run-make/pdb-buildinfo-cl-cmd/Makefile
7372
run-make/pgo-gen-lto/Makefile
7473
run-make/pgo-gen-no-imp-symbols/Makefile

tests/run-make/return-non-c-like-enum-from-c/Makefile

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// A reversed version of the `return-non-c-like-enum` test, though
2+
// this time, 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.
6+
// See https://github.com/rust-lang/rust/issues/68190
7+
8+
//@ ignore-cross-compile
9+
// Reason: the compiled binary is executed
10+
11+
use run_make_support::{build_native_static_lib, run, rustc};
12+
13+
fn main() {
14+
build_native_static_lib("test");
15+
rustc().input("nonclike.rs").arg("-ltest").run();
16+
run("nonclike");
17+
}

0 commit comments

Comments
 (0)