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.
This commit is contained in:
Georg Brandl 2024-03-11 13:40:26 +01:00 committed by GitHub
parent 93323bc922
commit a7fa1bdf22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -485,7 +485,7 @@ impl PyErr {
/// ///
/// Use this function when the error is expected to have been set, for example from /// 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. /// [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] #[inline]
pub fn fetch(py: Python<'_>) -> PyErr { pub fn fetch(py: Python<'_>) -> PyErr {
const FAILED_TO_FETCH: &str = "attempted to fetch exception but none was set"; const FAILED_TO_FETCH: &str = "attempted to fetch exception but none was set";