Add full path for PyCell

This commit is contained in:
mejrs 2021-07-03 03:55:03 +02:00 committed by David Hewitt
parent c179c8844f
commit c07c5a4c93
2 changed files with 5 additions and 5 deletions

View File

@ -538,7 +538,7 @@ fn impl_class(
const IS_BASETYPE: bool = #is_basetype; const IS_BASETYPE: bool = #is_basetype;
const IS_SUBCLASS: bool = #is_subclass; const IS_SUBCLASS: bool = #is_subclass;
type Layout = PyCell<Self>; type Layout = pyo3::PyCell<Self>;
type BaseType = #base; type BaseType = #base;
type ThreadChecker = #thread_checker; type ThreadChecker = #thread_checker;

View File

@ -1,8 +1,8 @@
error[E0277]: the trait bound `i32: From<&pyo3::PyCell<MyClass>>` is not satisfied error[E0277]: the trait bound `i32: From<&PyCell<MyClass>>` is not satisfied
--> $DIR/invalid_pymethod_receiver.rs:8:43 --> $DIR/invalid_pymethod_receiver.rs:8:43
| |
8 | fn method_with_invalid_self_type(slf: i32, py: Python, index: u32) {} 8 | fn method_with_invalid_self_type(slf: i32, py: Python, index: u32) {}
| ^^^ the trait `From<&pyo3::PyCell<MyClass>>` is not implemented for `i32` | ^^^ the trait `From<&PyCell<MyClass>>` is not implemented for `i32`
| |
= help: the following implementations were found: = help: the following implementations were found:
<i32 as From<NonZeroI32>> <i32 as From<NonZeroI32>>
@ -10,6 +10,6 @@ error[E0277]: the trait bound `i32: From<&pyo3::PyCell<MyClass>>` is not satisfi
<i32 as From<i16>> <i32 as From<i16>>
<i32 as From<i8>> <i32 as From<i8>>
and 2 others and 2 others
= note: required because of the requirements on the impl of `Into<i32>` for `&pyo3::PyCell<MyClass>` = note: required because of the requirements on the impl of `Into<i32>` for `&PyCell<MyClass>`
= note: required because of the requirements on the impl of `TryFrom<&pyo3::PyCell<MyClass>>` for `i32` = note: required because of the requirements on the impl of `TryFrom<&PyCell<MyClass>>` for `i32`
= note: required by `std::convert::TryFrom::try_from` = note: required by `std::convert::TryFrom::try_from`