diff --git a/pyo3-macros-backend/src/pyclass.rs b/pyo3-macros-backend/src/pyclass.rs index 88eeb15b..71ba5899 100644 --- a/pyo3-macros-backend/src/pyclass.rs +++ b/pyo3-macros-backend/src/pyclass.rs @@ -538,7 +538,7 @@ fn impl_class( const IS_BASETYPE: bool = #is_basetype; const IS_SUBCLASS: bool = #is_subclass; - type Layout = PyCell; + type Layout = pyo3::PyCell; type BaseType = #base; type ThreadChecker = #thread_checker; diff --git a/tests/ui/invalid_pymethod_receiver.stderr b/tests/ui/invalid_pymethod_receiver.stderr index babc831e..d6dc0ac6 100644 --- a/tests/ui/invalid_pymethod_receiver.stderr +++ b/tests/ui/invalid_pymethod_receiver.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `i32: From<&pyo3::PyCell>` is not satisfied +error[E0277]: the trait bound `i32: From<&PyCell>` is not satisfied --> $DIR/invalid_pymethod_receiver.rs:8:43 | 8 | fn method_with_invalid_self_type(slf: i32, py: Python, index: u32) {} - | ^^^ the trait `From<&pyo3::PyCell>` is not implemented for `i32` + | ^^^ the trait `From<&PyCell>` is not implemented for `i32` | = help: the following implementations were found: > @@ -10,6 +10,6 @@ error[E0277]: the trait bound `i32: From<&pyo3::PyCell>` is not satisfi > > and 2 others - = note: required because of the requirements on the impl of `Into` for `&pyo3::PyCell` - = note: required because of the requirements on the impl of `TryFrom<&pyo3::PyCell>` for `i32` + = note: required because of the requirements on the impl of `Into` for `&PyCell` + = note: required because of the requirements on the impl of `TryFrom<&PyCell>` for `i32` = note: required by `std::convert::TryFrom::try_from`