Add Rust 2015 edition test for nested modules
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define EXPORT_ME_TOO 42
|
||||
|
||||
typedef struct ExportMe {
|
||||
uint64_t val;
|
||||
} ExportMe;
|
||||
|
||||
void export_me(ExportMe *val);
|
||||
@@ -0,0 +1,20 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define EXPORT_ME_TOO 42
|
||||
|
||||
typedef struct ExportMe {
|
||||
uint64_t val;
|
||||
} ExportMe;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void export_me(ExportMe *val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
@@ -0,0 +1,12 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define EXPORT_ME_TOO 42
|
||||
|
||||
typedef struct {
|
||||
uint64_t val;
|
||||
} ExportMe;
|
||||
|
||||
void export_me(ExportMe *val);
|
||||
@@ -0,0 +1,20 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define EXPORT_ME_TOO 42
|
||||
|
||||
typedef struct {
|
||||
uint64_t val;
|
||||
} ExportMe;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void export_me(ExportMe *val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
@@ -0,0 +1,16 @@
|
||||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <new>
|
||||
|
||||
static const uint8_t EXPORT_ME_TOO = 42;
|
||||
|
||||
struct ExportMe {
|
||||
uint64_t val;
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
|
||||
void export_me(ExportMe *val);
|
||||
|
||||
} // extern "C"
|
||||
@@ -0,0 +1,12 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define EXPORT_ME_TOO 42
|
||||
|
||||
struct ExportMe {
|
||||
uint64_t val;
|
||||
};
|
||||
|
||||
void export_me(struct ExportMe *val);
|
||||
@@ -0,0 +1,20 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define EXPORT_ME_TOO 42
|
||||
|
||||
struct ExportMe {
|
||||
uint64_t val;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void export_me(struct ExportMe *val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "mod_2015"
|
||||
version = "0.1.0"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "mod_2015"
|
||||
version = "0.1.0"
|
||||
authors = ["cbindgen"]
|
||||
edition = "2015"
|
||||
|
||||
[lib]
|
||||
name = "mod_2015"
|
||||
crate-type = ["lib", "dylib"]
|
||||
@@ -0,0 +1,2 @@
|
||||
[parse]
|
||||
parse_deps = false
|
||||
@@ -0,0 +1 @@
|
||||
pub mod nested;
|
||||
@@ -0,0 +1 @@
|
||||
pub mod other;
|
||||
@@ -0,0 +1,14 @@
|
||||
#[repr(C)]
|
||||
pub struct ExportMe {
|
||||
val: u64
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
pub struct DoNotExportMe {
|
||||
val: u64
|
||||
}
|
||||
|
||||
pub const EXPORT_ME_TOO: u8 = 0x2a;
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn export_me(val: *mut ExportMe) { }
|
||||
Reference in New Issue
Block a user