hygiene: normal macros should generate `$crate` (#2021)

This commit is contained in:
Georg Brandl 2021-11-23 20:00:28 +01:00 committed by GitHub
parent a0d3ab0de1
commit f5f47bebcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -275,7 +275,7 @@ macro_rules! define_pyclass_binary_operator_slot {
_other: *mut $crate::ffi::PyObject,
) -> *mut $crate::ffi::PyObject {
$crate::callback::handle_panic(|py| {
use ::pyo3::class::impl_::*;
use $crate::class::impl_::*;
let collector = PyClassImplCollector::<$cls>::new();
let lhs_result = collector.$lhs(py, _slf, _other)?;
if lhs_result == $crate::ffi::Py_NotImplemented() {
@ -467,7 +467,7 @@ macro_rules! generate_pyclass_pow_slot {
_mod: *mut $crate::ffi::PyObject,
) -> *mut $crate::ffi::PyObject {
$crate::callback::handle_panic(|py| {
use ::pyo3::class::impl_::*;
use $crate::class::impl_::*;
let collector = PyClassImplCollector::<$cls>::new();
let lhs_result = collector.__pow__(py, _slf, _other, _mod)?;
if lhs_result == $crate::ffi::Py_NotImplemented() {