From a7fa1bdf22c67e93543c9c4aa1927c52a1124e24 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 11 Mar 2024 13:40:26 +0100 Subject: [PATCH] fix: remove "track_caller" cfg check (#3951) This "cfg" value does not seem to exist (any more?), and #[track_caller] is used a lot elsewhere without cfg_attr. Found using cargo check -Zcheck-cfg. --- src/err/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/err/mod.rs b/src/err/mod.rs index 5e054449..cc4de799 100644 --- a/src/err/mod.rs +++ b/src/err/mod.rs @@ -485,7 +485,7 @@ impl PyErr { /// /// Use this function when the error is expected to have been set, for example from /// [PyErr::occurred] or by an error return value from a C FFI function. - #[cfg_attr(all(debug_assertions, track_caller), track_caller)] + #[cfg_attr(debug_assertions, track_caller)] #[inline] pub fn fetch(py: Python<'_>) -> PyErr { const FAILED_TO_FETCH: &str = "attempted to fetch exception but none was set";