2022-02-08 08:01:30 +00:00
|
|
|
error[E0271]: type mismatch resolving `<Foo as PyClassImpl>::Mutability == Mutable`
|
|
|
|
--> tests/ui/invalid_immutable_pyclass_borrow.rs:10:33
|
|
|
|
|
|
|
|
|
10 | let borrow = foo.as_ref(py).borrow_mut();
|
|
|
|
| ^^^^^^^^^^ expected struct `Mutable`, found struct `Immutable`
|
|
|
|
|
|
|
|
|
= note: required because of the requirements on the impl of `MutablePyClass` for `Foo`
|
|
|
|
note: required by a bound in `PyCell::<T>::borrow_mut`
|
|
|
|
--> src/pycell.rs
|
|
|
|
|
|
|
|
|
| T: MutablePyClass,
|
|
|
|
| ^^^^^^^^^^^^^^ required by this bound in `PyCell::<T>::borrow_mut`
|
2022-04-21 07:03:45 +00:00
|
|
|
|
|
|
|
error[E0271]: type mismatch resolving `<ImmutableChild as PyClassImpl>::Mutability == Mutable`
|
|
|
|
--> tests/ui/invalid_immutable_pyclass_borrow.rs:20:35
|
|
|
|
|
|
|
|
|
20 | let borrow = child.as_ref(py).borrow_mut();
|
|
|
|
| ^^^^^^^^^^ expected struct `Mutable`, found struct `Immutable`
|
|
|
|
|
|
|
|
|
= note: required because of the requirements on the impl of `MutablePyClass` for `ImmutableChild`
|
|
|
|
note: required by a bound in `PyCell::<T>::borrow_mut`
|
|
|
|
--> src/pycell.rs
|
|
|
|
|
|
|
|
|
| T: MutablePyClass,
|
|
|
|
| ^^^^^^^^^^^^^^ required by this bound in `PyCell::<T>::borrow_mut`
|