summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-03-13 12:22:11 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-03-13 12:25:06 +0100
commit853ae4d96c7c1b33965fabd822ee9a7201847597 (patch)
tree5cd215a00f4ac8096ad0c3291ca664881c72e923
parent965dff29049c792f9243f2bbb9f5e64ba0b2ce52 (diff)
tests: Test repr(align()) only on nightly for now, make it 1.25 to reflect reality.
-rw-r--r--src/features.rs7
-rw-r--r--tests/expectations/tests/repr-align.rs1
-rw-r--r--tests/headers/repr-align.hpp2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/features.rs b/src/features.rs
index 1b490f54..866d7126 100644
--- a/src/features.rs
+++ b/src/features.rs
@@ -92,8 +92,8 @@ macro_rules! rust_target_base {
=> Stable_1_19 => 1.19;
/// Rust stable 1.21
=> Stable_1_21 => 1.21;
- /// Rust stable 1.24
- => Stable_1_24 => 1.24;
+ /// Rust stable 1.25
+ => Stable_1_25 => 1.25;
/// Nightly rust
=> Nightly => nightly;
);
@@ -156,7 +156,7 @@ impl From<RustTarget> for RustFeatures {
features.builtin_clone_impls = true;
}
- if rust_target >= RustTarget::Stable_1_24 {
+ if rust_target >= RustTarget::Stable_1_25 {
features.repr_align = true;
}
@@ -191,6 +191,7 @@ mod test {
test_target("1.0", RustTarget::Stable_1_0);
test_target("1.19", RustTarget::Stable_1_19);
test_target("1.21", RustTarget::Stable_1_21);
+ test_target("1.25", RustTarget::Stable_1_25);
test_target("nightly", RustTarget::Nightly);
}
}
diff --git a/tests/expectations/tests/repr-align.rs b/tests/expectations/tests/repr-align.rs
index 9689dacd..1827ca9d 100644
--- a/tests/expectations/tests/repr-align.rs
+++ b/tests/expectations/tests/repr-align.rs
@@ -1,6 +1,7 @@
/* automatically generated by rust-bindgen */
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#![cfg(feature = "nightly")]
#[repr(C)]
#[repr(align(8))]
diff --git a/tests/headers/repr-align.hpp b/tests/headers/repr-align.hpp
index 5e1b60ab..3347594b 100644
--- a/tests/headers/repr-align.hpp
+++ b/tests/headers/repr-align.hpp
@@ -1,4 +1,4 @@
-// bindgen-flags: --rust-target 1.24 -- -std=c++11
+// bindgen-flags: --raw-line '#![cfg(feature = "nightly")]' --rust-target 1.25 -- -std=c++11
struct alignas(8) a {
int b;