From 52f8285254cee90a5be8ede6c71975cb5eea1c0d Mon Sep 17 00:00:00 2001 From: oberrich Date: Sun, 29 Dec 2024 07:12:49 +0100 Subject: [PATCH] fix: use target arch inside error message --- src/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build.rs b/src/build.rs index 4633041..033bff2 100644 --- a/src/build.rs +++ b/src/build.rs @@ -94,7 +94,7 @@ mod regen { let mut raw_lines = vec![ format!("// Generated at {}", chrono::offset::Local::now()), format!("#[cfg(not(target_arch = \"{}\"))]", std::env::var("CARGO_CFG_TARGET_ARCH").unwrap()), - format!("compile_error!(\"These bindings can only be used on `{}` architectures. To generate bindings for your target architecture, consider using the `regenerate` feature.\");", std::env::consts::ARCH), + format!("compile_error!(\"These bindings can only be used on `{}` architectures. To generate bindings for your target architecture, consider using the `regenerate` feature.\");", std::env::var("CARGO_CFG_TARGET_ARCH").unwrap()), "".into(), "use cty;".into(), ];