From 4ea82a2e1ba5f60bc20186416868275f4dfffe18 Mon Sep 17 00:00:00 2001 From: Yury Yarashevich Date: Wed, 14 May 2025 12:29:33 +0200 Subject: [PATCH] Update bindgen from 0.70.1 -> 0.71.1. --- Cargo.toml | 2 +- boring-sys/build/main.rs | 5 ++++- boring-sys/src/lib.rs | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e8c3fd2f..4c2a29dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ boring-sys = { version = "4.16.0", path = "./boring-sys" } boring = { version = "4.16.0", path = "./boring" } tokio-boring = { version = "4.16.0", path = "./tokio-boring" } -bindgen = { version = "0.70.1", default-features = false, features = ["runtime"] } +bindgen = { version = "0.71.1", default-features = false, features = ["runtime"] } bytes = "1" cmake = "0.1.18" fs_extra = "1.3.0" diff --git a/boring-sys/build/main.rs b/boring-sys/build/main.rs index e397e710..6cdcad66 100644 --- a/boring-sys/build/main.rs +++ b/boring-sys/build/main.rs @@ -724,9 +724,12 @@ fn main() { // bindgen 0.70 replaced the run-time layout tests with compile-time ones, // but they depend on std::mem::offset_of, stabilized in 1.77. let supports_layout_tests = autocfg::new().probe_rustc_version(1, 77); + let Ok(target_rust_version) = bindgen::RustTarget::stable(68, 0) else { + panic!("bindgen does not recognize target rust version"); + }; let mut builder = bindgen::Builder::default() - .rust_target(bindgen::RustTarget::Stable_1_68) // bindgen MSRV is 1.70, so this is enough + .rust_target(target_rust_version) // bindgen MSRV is 1.70, so this is enough .derive_copy(true) .derive_debug(true) .derive_default(true) diff --git a/boring-sys/src/lib.rs b/boring-sys/src/lib.rs index 094221ff..404a9008 100644 --- a/boring-sys/src/lib.rs +++ b/boring-sys/src/lib.rs @@ -19,6 +19,7 @@ use std::os::raw::{c_char, c_int, c_uint, c_ulong}; #[allow( clippy::useless_transmute, clippy::derive_partial_eq_without_eq, + clippy::ptr_offset_with_cast, dead_code )] mod generated {