msquic icon indicating copy to clipboard operation
msquic copied to clipboard

Update bindgen requirement from 0.71 to 0.72

Open dependabot[bot] opened this issue 6 months ago • 3 comments

Updates the requirements on bindgen to permit the latest version.

Release notes

Sourced from bindgen's releases.

v0.72.0

Added

  • Report enums in ParseCallbacks.
  • Refactor item_name method to use ItemInfo struct.
  • Add callback to modify contents of macro
  • Discovery callbacks for functions and methods.
  • Options to generate uncallable C++ functions.
  • Provide option to get real virtual fn receiver.

Changed

  • Generate bindings compatible with current rustc version by default.

Removed

  • Remove unused which-rustfmt feature
  • Remove warning for opaque forward declarations

Fixed

  • More sophisticated handling of the triple in rust_to_clang_target
  • Rename *-apple-ios-sim to ...simulator
  • Fix OpenCL vectors that use "ext_vector_type".
  • Fix union layout when it contains 0 sized array.
  • Avoid crashing on variadic unions without layout information.
  • Distinguish char16_t.
  • Fix bugs in --clang-macro-fallback
  • Add missed unsafe in the raw_set_bit function
  • Use link_name for dynamic library loading
  • Add "gen" to list of rust keywords in 'rust_mangle'
  • Use appropriate rustfmt --format ... param

Full Changelog: https://github.com/rust-lang/rust-bindgen/compare/v0.71.1...v0.72.0

Changelog

Sourced from bindgen's changelog.

0.72.0 (2025-06-08)

Added

  • Report enums in ParseCallbacks.
  • Refactor item_name method to use ItemInfo struct.
  • Add callback to modify contents of macro
  • Discovery callbacks for functions and methods.
  • Options to generate uncallable C++ functions.
  • Provide option to get real virtual fn receiver.

Changed

  • Generate bindings compatible with current rustc version by default.

Removed

  • Remove unused which-rustfmt feature
  • Remove warning for opaque forward declarations

Fixed

  • More sophisticated handling of the triple in rust_to_clang_target
  • Rename *-apple-ios-sim to ...simulator
  • Fix OpenCL vectors that use "ext_vector_type".
  • Fix union layout when it contains 0 sized array.
  • Avoid crashing on variadic unions without layout information.
  • Distinguish char16_t.
  • Fix bugs in --clang-macro-fallback
  • Add missed unsafe in the raw_set_bit function
  • Use link_name for dynamic library loading
  • Add "gen" to list of rust keywords in 'rust_mangle'
  • Use appropriate rustfmt --format ... param

v0.71.1 (2024-12-09)

Fixed

  • Fix --version and --generate-shell-completions (#3040)

0.71.0 (2024-12-06)

Added

  • Add the ParseCallbacks::new_item_found callback to expose the original and final name of structs, unions and enums (#2658).
  • Add the field_type_name field to FieldInfo to expose the name of the type of a field (#2863)
  • Add support for custom attributes with the --with-attribute-custom flag (#2866)
  • Allow setting --rust-target to any Rust version supported by bindgen (#2993)
  • Use c-string literals if the --generate-cstr flag is used for Rust targets after 1.77 under the 2021 edition (#2996)
  • Add the --rust-edition flag which allows to select which Rust edition to target. (#3002, #3013)
  • Use unsafe extern instead of extern in blocks for any Rust target after 1.82. (#3015)

Changed

  • The --wrap-static-fns related options no longer require the experimental feature or flag (#2928)
  • Use the Display implementation instead of the Debug one for BindgenError in bindgen-cli (#3005)

... (truncated)

Commits
  • d0e7d6b chore: Release
  • e7f0b9d Update changelog.
  • 2882af2 Refactor item_name method to use ItemInfo struct
  • e2940cd chore: Fix some warnings with latest stable.
  • 5d7f684 codegen: Avoid crashing on variadic unions without layout information.
  • 2613129 Remove unused which-rustfmt feature
  • fef1561 Fix rustfmt errors
  • 965a13c Add test
  • b9c6984 Use callbacks properly
  • 803d73e Use parse_callbacks from options
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

dependabot[bot] avatar Jun 14 '25 16:06 dependabot[bot]

Cargo - windows-latest

The rust bindings need to be updated. Please apply (git apply) this patch:

diff --git a/src/rs/ffi/win_bindings.rs b/src/rs/ffi/win_bindings.rs
index 63decb4..6e3c54a 100644
--- a/src/rs/ffi/win_bindings.rs
+++ b/src/rs/ffi/win_bindings.rs
@@ -1,4 +1,4 @@
-/* automatically generated by rust-bindgen 0.71.1 */
+/* automatically generated by rust-bindgen 0.72.0 */
 
 #[repr(C)]
 #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
@@ -36,7 +36,9 @@ where
     pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
         debug_assert!(index / 8 < core::mem::size_of::<Storage>());
         let byte_index = index / 8;
-        let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize);
+        let byte = unsafe {
+            *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize)
+        };
         Self::extract_bit(byte, index)
     }
     #[inline]
@@ -47,11 +49,7 @@ where
             index % 8
         };
         let mask = 1 << bit_index;
-        if val {
-            byte | mask
-        } else {
-            byte & !mask
-        }
+        if val { byte | mask } else { byte & !mask }
     }
     #[inline]
     pub fn set_bit(&mut self, index: usize, val: bool) {
@@ -64,9 +62,10 @@ where
     pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
         debug_assert!(index / 8 < core::mem::size_of::<Storage>());
         let byte_index = index / 8;
-        let byte =
-            (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize);
-        *byte = Self::change_bit(*byte, index, val);
+        let byte = unsafe {
+            (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize)
+        };
+        unsafe { *byte = Self::change_bit(*byte, index, val) };
     }
     #[inline]
     pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
@@ -93,7 +92,7 @@ where
         debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
         let mut val = 0;
         for i in 0..(bit_width as usize) {
-            if Self::raw_get_bit(this, i + bit_offset) {
+            if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
                 let index = if cfg!(target_endian = "big") {
                     bit_width as usize - 1 - i
                 } else {
@@ -133,7 +132,7 @@ where
             } else {
                 i
             };
-            Self::raw_set_bit(this, index + bit_offset, val_bit_is_set);
+            unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
         }
     }
 }
@@ -5734,7 +5733,11 @@ const _: () = {
         [::std::mem::size_of::<QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14>() - 16usize];
     ["Alignment of QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14"]
         [::std::mem::align_of::<QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14>() - 8usize];
-    ["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14::ResumptionStateLength"] [:: std :: mem :: offset_of ! (QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14 , ResumptionStateLength) - 0usize] ;
+    ["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14::ResumptionStateLength"]
+        [::std::mem::offset_of!(
+            QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14,
+            ResumptionStateLength
+        ) - 0usize];
     ["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14::ResumptionState"][::std::mem::offset_of!(
         QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14,
         ResumptionState
@@ -5753,7 +5756,11 @@ const _: () = {
         [::std::mem::size_of::<QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15>() - 16usize];
     ["Alignment of QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15"]
         [::std::mem::align_of::<QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15>() - 8usize];
-    ["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15::ResumptionTicketLength"] [:: std :: mem :: offset_of ! (QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15 , ResumptionTicketLength) - 0usize] ;
+    ["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15::ResumptionTicketLength"]
+        [::std::mem::offset_of!(
+            QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15,
+            ResumptionTicketLength
+        ) - 0usize];
     ["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15::ResumptionTicket"][::std::mem::offset_of!(
         QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15,
         ResumptionTicket

github-actions[bot] avatar Jun 14 '25 16:06 github-actions[bot]

Cargo - ubuntu-latest

The rust bindings need to be updated. Please apply (git apply) this patch:

diff --git a/src/rs/ffi/linux_bindings.rs b/src/rs/ffi/linux_bindings.rs
index cf4039b..a6dcd0f 100644
--- a/src/rs/ffi/linux_bindings.rs
+++ b/src/rs/ffi/linux_bindings.rs
@@ -1,4 +1,4 @@
-/* automatically generated by rust-bindgen 0.71.1 */
+/* automatically generated by rust-bindgen 0.72.0 */
 
 #[repr(C)]
 #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
@@ -36,7 +36,9 @@ where
     pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
         debug_assert!(index / 8 < core::mem::size_of::<Storage>());
         let byte_index = index / 8;
-        let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize);
+        let byte = unsafe {
+            *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize)
+        };
         Self::extract_bit(byte, index)
     }
     #[inline]
@@ -47,11 +49,7 @@ where
             index % 8
         };
         let mask = 1 << bit_index;
-        if val {
-            byte | mask
-        } else {
-            byte & !mask
-        }
+        if val { byte | mask } else { byte & !mask }
     }
     #[inline]
     pub fn set_bit(&mut self, index: usize, val: bool) {
@@ -64,9 +62,10 @@ where
     pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
         debug_assert!(index / 8 < core::mem::size_of::<Storage>());
         let byte_index = index / 8;
-        let byte =
-            (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize);
-        *byte = Self::change_bit(*byte, index, val);
+        let byte = unsafe {
+            (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize)
+        };
+        unsafe { *byte = Self::change_bit(*byte, index, val) };
     }
     #[inline]
     pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
@@ -93,7 +92,7 @@ where
         debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
         let mut val = 0;
         for i in 0..(bit_width as usize) {
-            if Self::raw_get_bit(this, i + bit_offset) {
+            if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
                 let index = if cfg!(target_endian = "big") {
                     bit_width as usize - 1 - i
                 } else {
@@ -133,7 +132,7 @@ where
             } else {
                 i
             };
-            Self::raw_set_bit(this, index + bit_offset, val_bit_is_set);
+            unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
         }
     }
 }
@@ -5704,7 +5703,11 @@ const _: () = {
         [::std::mem::size_of::<QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14>() - 16usize];
     ["Alignment of QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14"]
         [::std::mem::align_of::<QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14>() - 8usize];
-    ["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14::ResumptionStateLength"] [:: std :: mem :: offset_of ! (QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14 , ResumptionStateLength) - 0usize] ;
+    ["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14::ResumptionStateLength"]
+        [::std::mem::offset_of!(
+            QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14,
+            ResumptionStateLength
+        ) - 0usize];
     ["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14::ResumptionState"][::std::mem::offset_of!(
         QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_14,
         ResumptionState
@@ -5723,7 +5726,11 @@ const _: () = {
         [::std::mem::size_of::<QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15>() - 16usize];
     ["Alignment of QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15"]
         [::std::mem::align_of::<QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15>() - 8usize];
-    ["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15::ResumptionTicketLength"] [:: std :: mem :: offset_of ! (QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15 , ResumptionTicketLength) - 0usize] ;
+    ["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15::ResumptionTicketLength"]
+        [::std::mem::offset_of!(
+            QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15,
+            ResumptionTicketLength
+        ) - 0usize];
     ["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15::ResumptionTicket"][::std::mem::offset_of!(
         QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_15,
         ResumptionTicket

github-actions[bot] avatar Jun 14 '25 16:06 github-actions[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.11%. Comparing base (2557a5d) to head (5be0f1e). Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5172      +/-   ##
==========================================
- Coverage   86.57%   86.11%   -0.47%     
==========================================
  Files          59       59              
  Lines       18086    18086              
==========================================
- Hits        15658    15574      -84     
- Misses       2428     2512      +84     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jun 17 '25 18:06 codecov[bot]