Skip to content

Commit 1e6db53

Browse files
alexdavidhewitt
authored andcommitted
fixes #5537 -- silence a clippy warning on rust 1.83 (#5538)
1 parent 7525512 commit 1e6db53

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

newsfragments/5538.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
silence a clippy warning on rust 1.83

pyo3-macros-backend/src/pyfunction.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,8 @@ pub fn impl_wrap_pyfunction(
443443
// inside a function body)
444444
#[allow(unknown_lints, non_local_definitions)]
445445
impl #name::MakeDef {
446+
// We're using this to initialize a static, so it's fine.
447+
#[allow(clippy::declare_interior_mutable_const)]
446448
const _PYO3_DEF: #pyo3_path::impl_::pyfunction::PyFunctionDef =
447449
#pyo3_path::impl_::pyfunction::PyFunctionDef::from_method_def(#methoddef);
448450
}

0 commit comments

Comments
 (0)