Use explicit lifetimes in proc-macro expansion
This commit is contained in:
parent
e8b9a991d3
commit
53773d5484
|
@ -263,7 +263,7 @@ fn impl_arg_param(
|
||||||
let (target_ty, borrow_tmp) = if arg.optional.is_some() {
|
let (target_ty, borrow_tmp) = if arg.optional.is_some() {
|
||||||
// Get Option<&T> from Option<PyRef<T>>
|
// Get Option<&T> from Option<PyRef<T>>
|
||||||
(
|
(
|
||||||
quote_arg_span! { Option<<#tref as pyo3::derive_utils::ExtractExt>::Target> },
|
quote_arg_span! { Option<<#tref as pyo3::derive_utils::ExtractExt<'_>>::Target> },
|
||||||
if mut_.is_some() {
|
if mut_.is_some() {
|
||||||
quote_arg_span! { _tmp.as_deref_mut() }
|
quote_arg_span! { _tmp.as_deref_mut() }
|
||||||
} else {
|
} else {
|
||||||
|
@ -273,7 +273,7 @@ fn impl_arg_param(
|
||||||
} else {
|
} else {
|
||||||
// Get &T from PyRef<T>
|
// Get &T from PyRef<T>
|
||||||
(
|
(
|
||||||
quote_arg_span! { <#tref as pyo3::derive_utils::ExtractExt>::Target },
|
quote_arg_span! { <#tref as pyo3::derive_utils::ExtractExt<'_>>::Target },
|
||||||
quote_arg_span! { &#mut_ *_tmp },
|
quote_arg_span! { &#mut_ *_tmp },
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
|
@ -382,7 +382,7 @@ fn impl_class(
|
||||||
quote! {
|
quote! {
|
||||||
impl pyo3::class::impl_::PyClassWithFreeList for #cls {
|
impl pyo3::class::impl_::PyClassWithFreeList for #cls {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn get_free_list(_py: pyo3::Python) -> &mut pyo3::impl_::freelist::FreeList<*mut pyo3::ffi::PyObject> {
|
fn get_free_list(_py: pyo3::Python<'_>) -> &mut pyo3::impl_::freelist::FreeList<*mut pyo3::ffi::PyObject> {
|
||||||
static mut FREELIST: *mut pyo3::impl_::freelist::FreeList<*mut pyo3::ffi::PyObject> = 0 as *mut _;
|
static mut FREELIST: *mut pyo3::impl_::freelist::FreeList<*mut pyo3::ffi::PyObject> = 0 as *mut _;
|
||||||
unsafe {
|
unsafe {
|
||||||
if FREELIST.is_null() {
|
if FREELIST.is_null() {
|
||||||
|
@ -503,7 +503,7 @@ fn impl_class(
|
||||||
const MODULE: Option<&'static str> = #module;
|
const MODULE: Option<&'static str> = #module;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn type_object_raw(py: pyo3::Python) -> *mut pyo3::ffi::PyTypeObject {
|
fn type_object_raw(py: pyo3::Python<'_>) -> *mut pyo3::ffi::PyTypeObject {
|
||||||
#deprecations
|
#deprecations
|
||||||
|
|
||||||
use pyo3::type_object::LazyStaticType;
|
use pyo3::type_object::LazyStaticType;
|
||||||
|
|
Loading…
Reference in a new issue