Skip to content

Commit 853ae4d

Browse files
committed
tests: Test repr(align()) only on nightly for now, make it 1.25 to reflect reality.
1 parent 965dff2 commit 853ae4d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/features.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ macro_rules! rust_target_base {
9292
=> Stable_1_19 => 1.19;
9393
/// Rust stable 1.21
9494
=> Stable_1_21 => 1.21;
95-
/// Rust stable 1.24
96-
=> Stable_1_24 => 1.24;
95+
/// Rust stable 1.25
96+
=> Stable_1_25 => 1.25;
9797
/// Nightly rust
9898
=> Nightly => nightly;
9999
);
@@ -156,7 +156,7 @@ impl From<RustTarget> for RustFeatures {
156156
features.builtin_clone_impls = true;
157157
}
158158

159-
if rust_target >= RustTarget::Stable_1_24 {
159+
if rust_target >= RustTarget::Stable_1_25 {
160160
features.repr_align = true;
161161
}
162162

@@ -191,6 +191,7 @@ mod test {
191191
test_target("1.0", RustTarget::Stable_1_0);
192192
test_target("1.19", RustTarget::Stable_1_19);
193193
test_target("1.21", RustTarget::Stable_1_21);
194+
test_target("1.25", RustTarget::Stable_1_25);
194195
test_target("nightly", RustTarget::Nightly);
195196
}
196197
}

tests/expectations/tests/repr-align.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* automatically generated by rust-bindgen */
22

33
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
4+
#![cfg(feature = "nightly")]
45

56
#[repr(C)]
67
#[repr(align(8))]

tests/headers/repr-align.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// bindgen-flags: --rust-target 1.24 -- -std=c++11
1+
// bindgen-flags: --raw-line '#![cfg(feature = "nightly")]' --rust-target 1.25 -- -std=c++11
22

33
struct alignas(8) a {
44
int b;

0 commit comments

Comments
 (0)