2024-05-03 07:42:30 +00:00
|
|
|
error[E0277]: the trait bound `i32: TryFrom<BoundRef<'_, '_, MyClass>>` is not satisfied
|
|
|
|
--> tests/ui/invalid_pymethod_receiver.rs:8:44
|
2022-01-13 21:25:23 +00:00
|
|
|
|
|
2024-05-03 07:42:30 +00:00
|
|
|
8 | fn method_with_invalid_self_type(_slf: i32, _py: Python<'_>, _index: u32) {}
|
|
|
|
| ^^^ the trait `From<BoundRef<'_, '_, MyClass>>` is not implemented for `i32`, which is required by `i32: TryFrom<BoundRef<'_, '_, MyClass>>`
|
2022-01-13 21:25:23 +00:00
|
|
|
|
|
2022-07-02 15:08:01 +00:00
|
|
|
= help: the following other types implement trait `From<T>`:
|
2023-01-26 20:44:05 +00:00
|
|
|
<i32 as From<bool>>
|
2023-08-25 08:48:01 +00:00
|
|
|
<i32 as From<i16>>
|
2024-06-13 18:24:13 +00:00
|
|
|
<i32 as From<i8>>
|
2023-08-25 08:48:01 +00:00
|
|
|
<i32 as From<u16>>
|
2024-06-13 18:24:13 +00:00
|
|
|
<i32 as From<u8>>
|
2024-02-25 07:13:36 +00:00
|
|
|
= note: required for `BoundRef<'_, '_, MyClass>` to implement `Into<i32>`
|
|
|
|
= note: required for `i32` to implement `TryFrom<BoundRef<'_, '_, MyClass>>`
|