2023-07-11 19:13:35 +00:00
|
|
|
error: cannot use `#[pyo3(set)]` on a `frozen` class
|
|
|
|
--> tests/ui/invalid_frozen_pyclass_borrow.rs:38:12
|
|
|
|
|
|
|
|
|
38 | #[pyo3(set)]
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error[E0271]: type mismatch resolving `<Foo as PyClass>::Frozen == False`
|
|
|
|
--> tests/ui/invalid_frozen_pyclass_borrow.rs:11:19
|
|
|
|
|
|
|
|
|
11 | fn mut_method(&mut self) {}
|
|
|
|
| ^ expected `False`, found `True`
|
|
|
|
|
|
|
|
|
note: required by a bound in `extract_pyclass_ref_mut`
|
|
|
|
--> src/impl_/extract_argument.rs
|
|
|
|
|
|
|
|
|
| pub fn extract_pyclass_ref_mut<'a, 'py: 'a, T: PyClass<Frozen = False>>(
|
|
|
|
| ^^^^^^^^^^^^^^ required by this bound in `extract_pyclass_ref_mut`
|
|
|
|
|
2022-06-11 11:20:43 +00:00
|
|
|
error[E0271]: type mismatch resolving `<Foo as PyClass>::Frozen == False`
|
2024-02-29 07:15:34 +00:00
|
|
|
--> tests/ui/invalid_frozen_pyclass_borrow.rs:15:31
|
2022-11-04 04:29:23 +00:00
|
|
|
|
|
2024-02-29 07:15:34 +00:00
|
|
|
15 | let borrow = foo.bind(py).borrow_mut();
|
|
|
|
| ^^^^^^^^^^ expected `False`, found `True`
|
2022-11-04 04:29:23 +00:00
|
|
|
|
|
2024-02-29 07:15:34 +00:00
|
|
|
note: required by a bound in `pyo3::Bound::<'py, T>::borrow_mut`
|
|
|
|
--> src/instance.rs
|
2022-11-04 04:29:23 +00:00
|
|
|
|
|
2024-02-29 07:15:34 +00:00
|
|
|
| pub fn borrow_mut(&self) -> PyRefMut<'py, T>
|
2023-07-14 09:28:17 +00:00
|
|
|
| ---------- required by a bound in this associated function
|
|
|
|
| where
|
2022-11-04 04:29:23 +00:00
|
|
|
| T: PyClass<Frozen = False>,
|
2024-02-29 07:15:34 +00:00
|
|
|
| ^^^^^^^^^^^^^^ required by this bound in `Bound::<'py, T>::borrow_mut`
|
2022-06-11 11:20:43 +00:00
|
|
|
|
|
|
|
error[E0271]: type mismatch resolving `<ImmutableChild as PyClass>::Frozen == False`
|
2024-02-29 07:15:34 +00:00
|
|
|
--> tests/ui/invalid_frozen_pyclass_borrow.rs:25:33
|
2022-11-04 04:29:23 +00:00
|
|
|
|
|
2024-02-29 07:15:34 +00:00
|
|
|
25 | let borrow = child.bind(py).borrow_mut();
|
|
|
|
| ^^^^^^^^^^ expected `False`, found `True`
|
2022-11-04 04:29:23 +00:00
|
|
|
|
|
2024-02-29 07:15:34 +00:00
|
|
|
note: required by a bound in `pyo3::Bound::<'py, T>::borrow_mut`
|
|
|
|
--> src/instance.rs
|
2022-11-04 04:29:23 +00:00
|
|
|
|
|
2024-02-29 07:15:34 +00:00
|
|
|
| pub fn borrow_mut(&self) -> PyRefMut<'py, T>
|
2023-07-14 09:28:17 +00:00
|
|
|
| ---------- required by a bound in this associated function
|
|
|
|
| where
|
2022-11-04 04:29:23 +00:00
|
|
|
| T: PyClass<Frozen = False>,
|
2024-02-29 07:15:34 +00:00
|
|
|
| ^^^^^^^^^^^^^^ required by this bound in `Bound::<'py, T>::borrow_mut`
|
2023-05-16 19:48:59 +00:00
|
|
|
|
|
|
|
error[E0271]: type mismatch resolving `<MutableBase as PyClass>::Frozen == True`
|
2023-07-11 19:13:35 +00:00
|
|
|
--> tests/ui/invalid_frozen_pyclass_borrow.rs:29:11
|
2023-05-16 19:48:59 +00:00
|
|
|
|
|
2023-07-11 19:13:35 +00:00
|
|
|
29 | class.get();
|
2023-05-16 19:48:59 +00:00
|
|
|
| ^^^ expected `True`, found `False`
|
|
|
|
|
|
|
|
|
note: required by a bound in `pyo3::Py::<T>::get`
|
|
|
|
--> src/instance.rs
|
|
|
|
|
|
2023-07-14 09:28:17 +00:00
|
|
|
| pub fn get(&self) -> &T
|
|
|
|
| --- required by a bound in this associated function
|
|
|
|
| where
|
2023-05-16 19:48:59 +00:00
|
|
|
| T: PyClass<Frozen = True> + Sync,
|
|
|
|
| ^^^^^^^^^^^^^ required by this bound in `Py::<T>::get`
|
|
|
|
|
|
|
|
error[E0271]: type mismatch resolving `<MutableBase as PyClass>::Frozen == True`
|
2023-07-11 19:13:35 +00:00
|
|
|
--> tests/ui/invalid_frozen_pyclass_borrow.rs:33:11
|
2023-05-16 19:48:59 +00:00
|
|
|
|
|
2023-07-11 19:13:35 +00:00
|
|
|
33 | class.get();
|
2023-05-16 19:48:59 +00:00
|
|
|
| ^^^ expected `True`, found `False`
|
|
|
|
|
|
2024-03-03 14:47:25 +00:00
|
|
|
note: required by a bound in `pyo3::Bound::<'py, T>::get`
|
|
|
|
--> src/instance.rs
|
2023-05-16 19:48:59 +00:00
|
|
|
|
|
2023-07-14 09:28:17 +00:00
|
|
|
| pub fn get(&self) -> &T
|
|
|
|
| --- required by a bound in this associated function
|
|
|
|
| where
|
2023-05-16 19:48:59 +00:00
|
|
|
| T: PyClass<Frozen = True> + Sync,
|
2024-03-03 14:47:25 +00:00
|
|
|
| ^^^^^^^^^^^^^ required by this bound in `Bound::<'py, T>::get`
|