pyo3/tests/ui/not_send.stderr

21 lines
1.3 KiB
Plaintext
Raw Normal View History

error[E0277]: `*mut pyo3::Python<'static>` cannot be shared between threads safely
2022-01-13 21:25:23 +00:00
--> tests/ui/not_send.rs:4:8
|
4 | py.allow_threads(|| { drop(py); });
| ^^^^^^^^^^^^^ `*mut pyo3::Python<'static>` cannot be shared between threads safely
|
= help: within `pyo3::Python<'_>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>`
= note: required because it appears within the type `PhantomData<*mut pyo3::Python<'static>>`
2022-01-11 07:50:02 +00:00
= note: required because it appears within the type `impl_::not_send::NotSend`
= note: required because it appears within the type `(&GILGuard, impl_::not_send::NotSend)`
= note: required because it appears within the type `PhantomData<(&GILGuard, impl_::not_send::NotSend)>`
2022-01-13 21:25:23 +00:00
= note: required because it appears within the type `pyo3::Python<'_>`
= note: required because of the requirements on the impl of `Send` for `&pyo3::Python<'_>`
= note: required because it appears within the type `[closure@$DIR/tests/ui/not_send.rs:4:22: 4:38]`
= note: required because of the requirements on the impl of `Ungil` for `[closure@$DIR/tests/ui/not_send.rs:4:22: 4:38]`
2022-01-13 21:25:23 +00:00
note: required by a bound in `pyo3::Python::<'py>::allow_threads`
--> src/marker.rs
2022-01-13 21:25:23 +00:00
|
| F: Ungil + FnOnce() -> T,
| ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads`