Skip to content

Commit 5b1860a

Browse files
committed
rewrite return-non-c-like-enum-from-c to rmake
1 parent 3811f40 commit 5b1860a

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
@@ -66,7 +66,6 @@ run-make/no-alloc-shim/Makefile
6666
run-make/no-builtins-attribute/Makefile
6767
run-make/no-duplicate-libs/Makefile
6868
run-make/panic-abort-eh_frame/Makefile
69-
run-make/pass-non-c-like-enum-to-c/Makefile
7069
run-make/pdb-buildinfo-cl-cmd/Makefile
7170
run-make/pgo-gen-lto/Makefile
7271
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)