2021-07-03 01:55:03 +00:00
|
|
|
error[E0277]: the trait bound `i32: From<&PyCell<MyClass>>` is not satisfied
|
2022-01-13 21:25:23 +00:00
|
|
|
--> tests/ui/invalid_pymethod_receiver.rs:8:43
|
|
|
|
|
|
2022-03-23 07:07:28 +00:00
|
|
|
8 | fn method_with_invalid_self_type(slf: i32, py: Python<'_>, index: u32) {}
|
2022-01-13 21:25:23 +00:00
|
|
|
| ^^^ the trait `From<&PyCell<MyClass>>` is not implemented for `i32`
|
|
|
|
|
|
2022-07-02 15:08:01 +00:00
|
|
|
= help: the following other types implement trait `From<T>`:
|
|
|
|
<f32 as From<i16>>
|
|
|
|
<f32 as From<i8>>
|
|
|
|
<f32 as From<u16>>
|
|
|
|
<f32 as From<u8>>
|
|
|
|
<f64 as From<f32>>
|
|
|
|
<f64 as From<i16>>
|
|
|
|
<f64 as From<i32>>
|
|
|
|
<f64 as From<i8>>
|
|
|
|
and 67 others
|
2022-01-13 21:25:23 +00:00
|
|
|
= 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<&PyCell<MyClass>>` for `i32`
|