about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/auxiliary/types.rs6
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs5
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/auxiliary/types.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/auxiliary/types.rs
index 4dc5932feab..5d9a8cfcac1 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/auxiliary/types.rs
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/auxiliary/types.rs
@@ -38,3 +38,9 @@ pub enum NonExhaustiveCLikeEnum {
     Four = 4,
     Five = 5,
 }
+
+#[repr(C)]
+pub struct NormalStructWithNonExhaustiveCLikeEnum {
+    one: u8,
+    two: NonExhaustiveCLikeEnum,
+}
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs
index c7f470fb787..858e3374eac 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs
@@ -8,7 +8,7 @@ extern crate types;
 
 use types::{
     NonExhaustiveCLikeEnum, NonExhaustiveEnum, NonExhaustiveVariants,
-    NormalStruct, TupleStruct, UnitStruct,
+    NormalStruct, TupleStruct, UnitStruct, NormalStructWithNonExhaustiveCLikeEnum
 };
 
 extern "C" {
@@ -27,6 +27,9 @@ extern "C" {
 // These should pass without remark, as they're C-compatible, despite being "non-exhaustive".
 extern "C" {
     pub fn non_exhaustive_c_compat_enum(_: NonExhaustiveCLikeEnum);
+    pub fn non_exhaustive_c_compat_enum_ret() -> *mut NonExhaustiveCLikeEnum;
+    pub fn struct_w_non_exhaustive_c_like_enum(_: NormalStructWithNonExhaustiveCLikeEnum);
+    pub fn struct_w_non_exhaustive_c_like_enum_ret() -> *mut NormalStructWithNonExhaustiveCLikeEnum;
 }
 
 fn main() {}