pyo3/tests/ui/not_send2.stderr

19 lines
1.1 KiB
Plaintext
Raw Normal View History

error[E0277]: `UnsafeCell<PyObject>` cannot be shared between threads safely
--> tests/ui/not_send2.rs:8:12
|
8 | py.allow_threads(|| {
| ^^^^^^^^^^^^^ `UnsafeCell<PyObject>` cannot be shared between threads safely
|
= help: within `&PyString`, the trait `Sync` is not implemented for `UnsafeCell<PyObject>`
= note: required because it appears within the type `PyAny`
= note: required because it appears within the type `PyString`
= note: required because it appears within the type `&PyString`
= note: required because of the requirements on the impl of `Send` for `&&PyString`
= note: required because it appears within the type `[closure@$DIR/tests/ui/not_send2.rs:8:26: 10:10]`
= note: required because of the requirements on the impl of `Ungil` for `[closure@$DIR/tests/ui/not_send2.rs:8:26: 10:10]`
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`