From d6f72ad0fe0cbf518fa34098a3abafa18383f6f5 Mon Sep 17 00:00:00 2001 From: Melvin Wang Date: Fri, 12 Sep 2025 11:26:17 -0700 Subject: [PATCH] fix: update nightly macro expansion test outputs --- .../bug_tuple_struct_shadowing.expanded.rs | 23 ++++++++----------- .../macrotest/bug_unused_imports.expanded.rs | 23 ++++++++----------- .../macrotest/wdf_device_create.expanded.rs | 23 ++++++++----------- ...device_create_device_interface.expanded.rs | 23 ++++++++----------- .../macrotest/wdf_driver_create.expanded.rs | 23 ++++++++----------- ...request_retrieve_output_buffer.expanded.rs | 23 ++++++++----------- .../wdf_spin_lock_acquire.expanded.rs | 23 ++++++++----------- .../wdf_verifier_dbg_break_point.expanded.rs | 23 ++++++++----------- 8 files changed, 72 insertions(+), 112 deletions(-) diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/bug_tuple_struct_shadowing.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/bug_tuple_struct_shadowing.expanded.rs index 7f592dee8..ca2b818d1 100644 --- a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/bug_tuple_struct_shadowing.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/bug_tuple_struct_shadowing.expanded.rs @@ -42,21 +42,16 @@ fn foo( let wdf_function_table = wdk_sys::WdfFunctions; let wdf_function_count = wdk_sys::wdf::__private::get_wdf_function_count(); if true { + if !isize::try_from( + wdf_function_count + * core::mem::size_of::(), + ) + .is_ok() { - match isize::try_from( - wdf_function_count - * core::mem::size_of::(), - ) - .is_ok() - { - true => {} - _ => { - ::core::panicking::panic( - "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", - ) - } - } - }; + ::core::panicking::panic( + "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", + ) + } } let wdf_function_table = core::slice::from_raw_parts( wdf_function_table, diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/bug_unused_imports.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/bug_unused_imports.expanded.rs index c92a69276..fb3d47552 100644 --- a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/bug_unused_imports.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/bug_unused_imports.expanded.rs @@ -50,21 +50,16 @@ pub extern "system" fn driver_entry( let wdf_function_table = wdk_sys::WdfFunctions; let wdf_function_count = wdk_sys::wdf::__private::get_wdf_function_count(); if true { + if !isize::try_from( + wdf_function_count + * core::mem::size_of::(), + ) + .is_ok() { - match isize::try_from( - wdf_function_count - * core::mem::size_of::(), - ) - .is_ok() - { - true => {} - _ => { - ::core::panicking::panic( - "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", - ) - } - } - }; + ::core::panicking::panic( + "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", + ) + } } let wdf_function_table = core::slice::from_raw_parts( wdf_function_table, diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create.expanded.rs index ea3e5c954..0e687de35 100644 --- a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create.expanded.rs @@ -20,21 +20,16 @@ extern "C" fn evt_driver_device_add( let wdf_function_table = wdk_sys::WdfFunctions; let wdf_function_count = wdk_sys::wdf::__private::get_wdf_function_count(); if true { + if !isize::try_from( + wdf_function_count + * core::mem::size_of::(), + ) + .is_ok() { - match isize::try_from( - wdf_function_count - * core::mem::size_of::(), - ) - .is_ok() - { - true => {} - _ => { - ::core::panicking::panic( - "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", - ) - } - } - }; + ::core::panicking::panic( + "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", + ) + } } let wdf_function_table = core::slice::from_raw_parts( wdf_function_table, diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.expanded.rs index df6011250..1e10670e7 100644 --- a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.expanded.rs @@ -22,21 +22,16 @@ fn create_device_interface(wdf_device: wdk_sys::WDFDEVICE) -> wdk_sys::NTSTATUS let wdf_function_table = wdk_sys::WdfFunctions; let wdf_function_count = wdk_sys::wdf::__private::get_wdf_function_count(); if true { + if !isize::try_from( + wdf_function_count + * core::mem::size_of::(), + ) + .is_ok() { - match isize::try_from( - wdf_function_count - * core::mem::size_of::(), - ) - .is_ok() - { - true => {} - _ => { - ::core::panicking::panic( - "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", - ) - } - } - }; + ::core::panicking::panic( + "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", + ) + } } let wdf_function_table = core::slice::from_raw_parts( wdf_function_table, diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_driver_create.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_driver_create.expanded.rs index 5ae894904..2f60cd9a4 100644 --- a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_driver_create.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_driver_create.expanded.rs @@ -27,21 +27,16 @@ pub extern "system" fn driver_entry( let wdf_function_table = wdk_sys::WdfFunctions; let wdf_function_count = wdk_sys::wdf::__private::get_wdf_function_count(); if true { + if !isize::try_from( + wdf_function_count + * core::mem::size_of::(), + ) + .is_ok() { - match isize::try_from( - wdf_function_count - * core::mem::size_of::(), - ) - .is_ok() - { - true => {} - _ => { - ::core::panicking::panic( - "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", - ) - } - } - }; + ::core::panicking::panic( + "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", + ) + } } let wdf_function_table = core::slice::from_raw_parts( wdf_function_table, diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_request_retrieve_output_buffer.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_request_retrieve_output_buffer.expanded.rs index a2b9cb84f..c2654fcb8 100644 --- a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_request_retrieve_output_buffer.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_request_retrieve_output_buffer.expanded.rs @@ -19,21 +19,16 @@ fn process_wdf_request(request: wdk_sys::WDFREQUEST) { let wdf_function_table = wdk_sys::WdfFunctions; let wdf_function_count = wdk_sys::wdf::__private::get_wdf_function_count(); if true { + if !isize::try_from( + wdf_function_count + * core::mem::size_of::(), + ) + .is_ok() { - match isize::try_from( - wdf_function_count - * core::mem::size_of::(), - ) - .is_ok() - { - true => {} - _ => { - ::core::panicking::panic( - "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", - ) - } - } - }; + ::core::panicking::panic( + "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", + ) + } } let wdf_function_table = core::slice::from_raw_parts( wdf_function_table, diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.expanded.rs index b078e18e2..0e2142bf3 100644 --- a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.expanded.rs @@ -11,21 +11,16 @@ fn acquire_lock(wdf_spin_lock: wdk_sys::WDFSPINLOCK) { let wdf_function_table = wdk_sys::WdfFunctions; let wdf_function_count = wdk_sys::wdf::__private::get_wdf_function_count(); if true { + if !isize::try_from( + wdf_function_count + * core::mem::size_of::(), + ) + .is_ok() { - match isize::try_from( - wdf_function_count - * core::mem::size_of::(), - ) - .is_ok() - { - true => {} - _ => { - ::core::panicking::panic( - "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", - ) - } - } - }; + ::core::panicking::panic( + "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", + ) + } } let wdf_function_table = core::slice::from_raw_parts( wdf_function_table, diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.expanded.rs index c12f403c3..3e18daad9 100644 --- a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.expanded.rs @@ -11,21 +11,16 @@ fn foo() { let wdf_function_table = wdk_sys::WdfFunctions; let wdf_function_count = wdk_sys::wdf::__private::get_wdf_function_count(); if true { + if !isize::try_from( + wdf_function_count + * core::mem::size_of::(), + ) + .is_ok() { - match isize::try_from( - wdf_function_count - * core::mem::size_of::(), - ) - .is_ok() - { - true => {} - _ => { - ::core::panicking::panic( - "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", - ) - } - } - }; + ::core::panicking::panic( + "assertion failed: isize::try_from(wdf_function_count *\n core::mem::size_of::()).is_ok()", + ) + } } let wdf_function_table = core::slice::from_raw_parts( wdf_function_table,