diff options
author | Travis Finkenauer <tmfinken@gmail.com> | 2017-08-04 09:51:42 -0700 |
---|---|---|
committer | Travis Finkenauer <tmfinken@gmail.com> | 2017-08-04 09:51:42 -0700 |
commit | 0bb7b9f1c4652f63f41eba4064b79c044fd3d955 (patch) | |
tree | ca47cc6347b7d41e7ccc27d828d817ec0e9252d3 /tests/headers/class_with_inner_struct_1_0.hpp | |
parent | 04fdb10212e729f77343f8548db2f8fdf83a5af9 (diff) |
Add --rust-target to replace --unstable-rust
Instead of specifying whether or not to use stable, specify the Rust
release to support (one of several stable/beta releases or nightly).
The --unstable-rust option is still accepted and implies nightly.
The definitions of `RustTarget` and `RustFeatures` are created with
macros.
For each test that uses unions, there is a version that uses the latest
stable release and stable 1.0.
Diffstat (limited to 'tests/headers/class_with_inner_struct_1_0.hpp')
-rw-r--r-- | tests/headers/class_with_inner_struct_1_0.hpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/headers/class_with_inner_struct_1_0.hpp b/tests/headers/class_with_inner_struct_1_0.hpp new file mode 100644 index 00000000..5145337f --- /dev/null +++ b/tests/headers/class_with_inner_struct_1_0.hpp @@ -0,0 +1,44 @@ +// bindgen-flags: --rust-target 1.0 -- -std=c++11 + + +class A { + unsigned c; + struct Segment { int begin, end; }; + union { + int f; + } named_union; + union { + int d; + }; +}; + +class B { + unsigned d; + struct Segment { int begin, end; }; +}; + + +enum class StepSyntax { + Keyword, // step-start and step-end + FunctionalWithoutKeyword, // steps(...) + FunctionalWithStartKeyword, // steps(..., start) + FunctionalWithEndKeyword, // steps(..., end) +}; + +class C { + unsigned d; + union { + struct { + float mX1; + float mY1; + float mX2; + float mY2; + } mFunc; + struct { + StepSyntax mStepSyntax; + unsigned int mSteps; + }; + }; + // To ensure it doesn't collide + struct Segment { int begin, end; }; +}; |