rewrite return-non-c-like-enum-from-c to rmake
This commit is contained in:
parent
3811f40d27
commit
5b1860a24e
@ -66,7 +66,6 @@ run-make/no-alloc-shim/Makefile
|
||||
run-make/no-builtins-attribute/Makefile
|
||||
run-make/no-duplicate-libs/Makefile
|
||||
run-make/panic-abort-eh_frame/Makefile
|
||||
run-make/pass-non-c-like-enum-to-c/Makefile
|
||||
run-make/pdb-buildinfo-cl-cmd/Makefile
|
||||
run-make/pgo-gen-lto/Makefile
|
||||
run-make/pgo-gen-no-imp-symbols/Makefile
|
||||
|
@ -1,6 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
|
||||
all: $(call NATIVE_STATICLIB,test)
|
||||
$(RUSTC) nonclike.rs -L$(TMPDIR) -ltest
|
||||
$(call RUN,nonclike)
|
17
tests/run-make/return-non-c-like-enum-from-c/rmake.rs
Normal file
17
tests/run-make/return-non-c-like-enum-from-c/rmake.rs
Normal file
@ -0,0 +1,17 @@
|
||||
// A reversed version of the `return-non-c-like-enum` test, though
|
||||
// this time, the C code is the library, and the Rust code compiles
|
||||
// into the executable. Once again, enum variants should be treated
|
||||
// like an union of structs, which should prevent segfaults or
|
||||
// unexpected results.
|
||||
// See https://github.com/rust-lang/rust/issues/68190
|
||||
|
||||
//@ ignore-cross-compile
|
||||
// Reason: the compiled binary is executed
|
||||
|
||||
use run_make_support::{build_native_static_lib, run, rustc};
|
||||
|
||||
fn main() {
|
||||
build_native_static_lib("test");
|
||||
rustc().input("nonclike.rs").arg("-ltest").run();
|
||||
run("nonclike");
|
||||
}
|
Loading…
Reference in New Issue
Block a user