From 539e831ce2f8a8d779acd21200a55d1bf185e6ec Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 20 Dec 2023 16:25:18 -0800 Subject: [PATCH] Detect whether unsafe_op_in_unsafe_fn lint is available --- build.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.rs b/build.rs index a31b631..23f9ac1 100644 --- a/build.rs +++ b/build.rs @@ -68,6 +68,10 @@ fn main() { // core::fmt::Arguments::as_str // https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html#stabilized-apis println!("cargo:rustc-cfg=anyhow_no_fmt_arguments_as_str"); + + // #![deny(unsafe_op_in_unsafe_fn)] + // https://github.com/rust-lang/rust/issues/71668 + println!("cargo:rustc-cfg=anyhow_no_unsafe_op_in_unsafe_fn_lint"); } }