pyo3/tests/ui/not_send_auto_trait.stderr

22 lines
1.1 KiB
Plaintext

error[E0277]: the trait bound `pyo3::Python<'_>: Ungil` is not satisfied in `[closure@$DIR/tests/ui/not_send_auto_trait.rs:4:22: 4:24]`
--> tests/ui/not_send_auto_trait.rs:4:22
|
4 | py.allow_threads(|| { drop(py); });
| ------------- --^^^^^^^^^^^^^^
| | |
| | within `[closure@$DIR/tests/ui/not_send_auto_trait.rs:4:22: 4:24]`, the trait `Ungil` is not implemented for `pyo3::Python<'_>`
| | within this `[closure@$DIR/tests/ui/not_send_auto_trait.rs:4:22: 4:24]`
| required by a bound introduced by this call
|
= note: required because it appears within the type `&pyo3::Python<'_>`
note: required because it's used within this closure
--> tests/ui/not_send_auto_trait.rs:4:22
|
4 | py.allow_threads(|| { drop(py); });
| ^^
note: required by a bound in `pyo3::Python::<'py>::allow_threads`
--> src/marker.rs
|
| F: Ungil + FnOnce() -> T,
| ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads`