From f4a9f1b7ceab7c9d55935c9624f9fce0067f3a9a Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Fri, 20 Oct 2023 11:31:07 -0500 Subject: [PATCH] harden standalone testing --- crates/tests/standalone/build.rs | 2 +- crates/tests/standalone/src/b_none.rs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 crates/tests/standalone/src/b_none.rs diff --git a/crates/tests/standalone/build.rs b/crates/tests/standalone/build.rs index dd15b53220..8af6e7a589 100644 --- a/crates/tests/standalone/build.rs +++ b/crates/tests/standalone/build.rs @@ -165,7 +165,7 @@ fn write_no_inner_attr(output: &str, filter: &[&str]) { } fn riddle(output: &str, filter: &[&str], config: &[&str]) { - std::fs::remove_file(output).expect("Failed to delete output"); + _ = std::fs::remove_file(output); let mut command = std::process::Command::new("cargo"); diff --git a/crates/tests/standalone/src/b_none.rs b/crates/tests/standalone/src/b_none.rs new file mode 100644 index 0000000000..037d27a448 --- /dev/null +++ b/crates/tests/standalone/src/b_none.rs @@ -0,0 +1,10 @@ +// Bindings generated by `windows-bindgen` 0.52.0 + +#![allow( + non_snake_case, + non_upper_case_globals, + non_camel_case_types, + dead_code, + clippy::all +)] +::windows_targets::link!("kernel32.dll" "system" fn GetTickCount() -> u32);