Skip to content

Commit 901f6f2

Browse files
committed
Bump the minimum Rust version to 1.25
This lets bindgen use `#[repr(align = …)]`, which removes the need for dummy `__bindgen_align` zero-size array fields. This field was only present with some versions of libclang (presumably), which could cause build failures like: ```rust error[E0560]: struct `generated::root::JS::Value` has no field named `__bindgen_align`sys --> /home/simon/projects/mozjs/src/jsval.rs:83:2 | 83 | __bindgen_align: [], | ^^^^^^^^^^^^^^^ `generated::root::JS::Value` does not have this field ```
1 parent 643afcd commit 901f6f2

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ rust:
33
- nightly
44
- beta
55
- stable
6+
- 1.25.0
67
sudo: 9000
78
dist: trusty
89
os:

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ fn build_jsapi_bindings() {
176176
config &= !bindgen::CodegenConfig::METHODS;
177177

178178
let mut builder = bindgen::builder()
179-
.rust_target(bindgen::RustTarget::Stable_1_19)
179+
.rust_target(bindgen::RustTarget::Stable_1_25)
180180
.header("./src/jsglue.hpp")
181181
// Translate every enum with the "rustified enum" strategy. We should
182182
// investigate switching to the "constified module" strategy, which has

src/jsval.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ const JSVAL_PAYLOAD_MASK: u64 = 0x00007FFFFFFFFFFF;
7979
#[inline(always)]
8080
fn AsJSVal(val: u64) -> JSVal {
8181
JSVal {
82-
#[cfg(all(target_os = "android", target_arch = "x86"))]
83-
__bindgen_align: [],
8482
data: Value_layout {
8583
asBits: val,
8684
}

0 commit comments

Comments
 (0)