diff --git a/pyo3-ffi/src/object.rs b/pyo3-ffi/src/object.rs index 1f3a1094..0e0243cd 100644 --- a/pyo3-ffi/src/object.rs +++ b/pyo3-ffi/src/object.rs @@ -487,7 +487,7 @@ pub unsafe fn Py_INCREF(op: *mut PyObject) { ) ))] { - return _Py_IncRef(op); + _Py_IncRef(op); } #[cfg(all(py_sys_config = "Py_REF_DEBUG", not(Py_3_10)))] @@ -552,7 +552,7 @@ pub unsafe fn Py_DECREF(op: *mut PyObject) { ) ))] { - return _Py_DecRef(op); + _Py_DecRef(op); } #[cfg(all(py_sys_config = "Py_REF_DEBUG", not(Py_3_10)))] diff --git a/tests/ui/not_send.stderr b/tests/ui/not_send.stderr index 395723cb..9ac51f36 100644 --- a/tests/ui/not_send.stderr +++ b/tests/ui/not_send.stderr @@ -34,7 +34,7 @@ note: required because it's used within this closure | 4 | py.allow_threads(|| { drop(py); }); | ^^ - = note: required for `[closure@$DIR/tests/ui/not_send.rs:4:22: 4:24]` to implement `Ungil` + = note: required for `{closure@$DIR/tests/ui/not_send.rs:4:22: 4:24}` to implement `Ungil` note: required by a bound in `pyo3::Python::<'py>::allow_threads` --> src/marker.rs | diff --git a/tests/ui/not_send2.stderr b/tests/ui/not_send2.stderr index 2e6db009..d3a60a1f 100644 --- a/tests/ui/not_send2.stderr +++ b/tests/ui/not_send2.stderr @@ -27,7 +27,7 @@ note: required because it's used within this closure | 8 | py.allow_threads(|| { | ^^ - = note: required for `[closure@$DIR/tests/ui/not_send2.rs:8:26: 8:28]` to implement `Ungil` + = note: required for `{closure@$DIR/tests/ui/not_send2.rs:8:26: 8:28}` to implement `Ungil` note: required by a bound in `pyo3::Python::<'py>::allow_threads` --> src/marker.rs |