11error[E0277]: `*mut c_void` cannot be sent between threads safely
2- --> tests/ui/pyclass_send.rs:4:1
3- |
4- 4 | #[pyclass]
5- | ^^^^^^^^^^ `*mut c_void` cannot be sent between threads safely
6- |
7- = help: within `NotSyncNotSend`, the trait `Send` is not implemented for `*mut c_void`
8- help: the trait `pyo3::impl_::pyclass::PyClassThreadChecker<T>` is implemented for `SendablePyClass<T>`
9- --> src/impl_/pyclass.rs
10- |
11- | impl<T: Send> PyClassThreadChecker<T> for SendablePyClass<T> {
12- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13- note: required because it appears within the type `NotSyncNotSend`
142 --> tests/ui/pyclass_send.rs:5:8
153 |
1645 | struct NotSyncNotSend(*mut c_void);
17- | ^^^^^^^^^^^^^^
18- = note: required for `SendablePyClass<NotSyncNotSend>` to implement `pyo3::impl_::pyclass::PyClassThreadChecker<NotSyncNotSend>`
19- note: required by a bound in `PyClassImpl::ThreadChecker`
20- --> src/impl_/pyclass.rs
21- |
22- | type ThreadChecker: PyClassThreadChecker<Self>;
23- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `PyClassImpl::ThreadChecker`
24- = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)
25-
26- error[E0277]: `*mut c_void` cannot be sent between threads safely
27- --> tests/ui/pyclass_send.rs:11:1
28- |
29- 11 | #[pyclass]
30- | ^^^^^^^^^^ `*mut c_void` cannot be sent between threads safely
31- |
32- = help: within `SyncNotSend`, the trait `Send` is not implemented for `*mut c_void`
33- help: the trait `pyo3::impl_::pyclass::PyClassThreadChecker<T>` is implemented for `SendablePyClass<T>`
34- --> src/impl_/pyclass.rs
35- |
36- | impl<T: Send> PyClassThreadChecker<T> for SendablePyClass<T> {
37- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38- note: required because it appears within the type `SyncNotSend`
39- --> tests/ui/pyclass_send.rs:12:8
40- |
41- 12 | struct SyncNotSend(*mut c_void);
42- | ^^^^^^^^^^^
43- = note: required for `SendablePyClass<SyncNotSend>` to implement `pyo3::impl_::pyclass::PyClassThreadChecker<SyncNotSend>`
44- note: required by a bound in `PyClassImpl::ThreadChecker`
45- --> src/impl_/pyclass.rs
46- |
47- | type ThreadChecker: PyClassThreadChecker<Self>;
48- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `PyClassImpl::ThreadChecker`
49- = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)
50-
51- error[E0277]: `*mut c_void` cannot be sent between threads safely
52- --> tests/ui/pyclass_send.rs:4:1
53- |
54- 4 | #[pyclass]
55- | ^^^^^^^^^^ `*mut c_void` cannot be sent between threads safely
5+ | ^^^^^^^^^^^^^^ `*mut c_void` cannot be sent between threads safely
566 |
577 = help: within `NotSyncNotSend`, the trait `Send` is not implemented for `*mut c_void`
588note: required because it appears within the type `NotSyncNotSend`
599 --> tests/ui/pyclass_send.rs:5:8
6010 |
61115 | struct NotSyncNotSend(*mut c_void);
6212 | ^^^^^^^^^^^^^^
63- note: required by a bound in `SendablePyClass `
64- --> src/impl_/pyclass.rs
13+ note: required by a bound in `assert_pyclass_send_sync `
14+ --> src/impl_/pyclass/assertions .rs
6515 |
66- | pub struct SendablePyClass<T: Send>(PhantomData<T>);
67- | ^^^^ required by this bound in `SendablePyClass`
68- = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)
69-
70- error[E0277]: `*mut c_void` cannot be sent between threads safely
71- --> tests/ui/pyclass_send.rs:11:1
72- |
73- 11 | #[pyclass]
74- | ^^^^^^^^^^ `*mut c_void` cannot be sent between threads safely
75- |
76- = help: within `SyncNotSend`, the trait `Send` is not implemented for `*mut c_void`
77- note: required because it appears within the type `SyncNotSend`
78- --> tests/ui/pyclass_send.rs:12:8
79- |
80- 12 | struct SyncNotSend(*mut c_void);
81- | ^^^^^^^^^^^
82- note: required by a bound in `SendablePyClass`
83- --> src/impl_/pyclass.rs
84- |
85- | pub struct SendablePyClass<T: Send>(PhantomData<T>);
86- | ^^^^ required by this bound in `SendablePyClass`
87- = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)
16+ | pub const fn assert_pyclass_send_sync<T>()
17+ | ------------------------ required by a bound in this function
18+ | where
19+ | T: Send + Sync,
20+ | ^^^^ required by this bound in `assert_pyclass_send_sync`
8821
8922error[E0277]: `*mut c_void` cannot be shared between threads safely
9023 --> tests/ui/pyclass_send.rs:5:8
@@ -98,14 +31,14 @@ note: required because it appears within the type `NotSyncNotSend`
9831 |
99325 | struct NotSyncNotSend(*mut c_void);
10033 | ^^^^^^^^^^^^^^
101- note: required by a bound in `assert_pyclass_sync `
34+ note: required by a bound in `assert_pyclass_send_sync `
10235 --> src/impl_/pyclass/assertions.rs
10336 |
104- | pub const fn assert_pyclass_sync <T>()
105- | ------------------- required by a bound in this function
37+ | pub const fn assert_pyclass_send_sync <T>()
38+ | ------------------------ required by a bound in this function
10639 | where
107- | T: PyClassSync + Sync,
108- | ^^^^ required by this bound in `assert_pyclass_sync `
40+ | T: Send + Sync,
41+ | ^^^^ required by this bound in `assert_pyclass_send_sync `
10942
11043error[E0277]: `*mut c_void` cannot be shared between threads safely
11144 --> tests/ui/pyclass_send.rs:8:8
@@ -119,11 +52,32 @@ note: required because it appears within the type `SendNotSync`
11952 |
120538 | struct SendNotSync(*mut c_void);
12154 | ^^^^^^^^^^^
122- note: required by a bound in `assert_pyclass_sync `
55+ note: required by a bound in `assert_pyclass_send_sync `
12356 --> src/impl_/pyclass/assertions.rs
12457 |
125- | pub const fn assert_pyclass_sync <T>()
126- | ------------------- required by a bound in this function
58+ | pub const fn assert_pyclass_send_sync <T>()
59+ | ------------------------ required by a bound in this function
12760 | where
128- | T: PyClassSync + Sync,
129- | ^^^^ required by this bound in `assert_pyclass_sync`
61+ | T: Send + Sync,
62+ | ^^^^ required by this bound in `assert_pyclass_send_sync`
63+
64+ error[E0277]: `*mut c_void` cannot be sent between threads safely
65+ --> tests/ui/pyclass_send.rs:12:8
66+ |
67+ 12 | struct SyncNotSend(*mut c_void);
68+ | ^^^^^^^^^^^ `*mut c_void` cannot be sent between threads safely
69+ |
70+ = help: within `SyncNotSend`, the trait `Send` is not implemented for `*mut c_void`
71+ note: required because it appears within the type `SyncNotSend`
72+ --> tests/ui/pyclass_send.rs:12:8
73+ |
74+ 12 | struct SyncNotSend(*mut c_void);
75+ | ^^^^^^^^^^^
76+ note: required by a bound in `assert_pyclass_send_sync`
77+ --> src/impl_/pyclass/assertions.rs
78+ |
79+ | pub const fn assert_pyclass_send_sync<T>()
80+ | ------------------------ required by a bound in this function
81+ | where
82+ | T: Send + Sync,
83+ | ^^^^ required by this bound in `assert_pyclass_send_sync`
0 commit comments