1 error: some fields in `RingBuffer<T>` are not safe to be sent to another thread
2 --> $DIR/non_send_fields_in_send_ty.rs:16:1
4 LL | unsafe impl<T> Send for RingBuffer<T> {}
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings`
8 note: it is not safe to send field `data` to another thread
9 --> $DIR/non_send_fields_in_send_ty.rs:11:5
11 LL | data: Vec<UnsafeCell<T>>,
12 | ^^^^^^^^^^^^^^^^^^^^^^^^
13 = help: add bounds on type parameter `T` that satisfy `Vec<UnsafeCell<T>>: Send`
15 error: some fields in `MvccRwLock<T>` are not safe to be sent to another thread
16 --> $DIR/non_send_fields_in_send_ty.rs:24:1
18 LL | unsafe impl<T> Send for MvccRwLock<T> {}
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21 note: it is not safe to send field `lock` to another thread
22 --> $DIR/non_send_fields_in_send_ty.rs:21:5
24 LL | lock: Mutex<Box<T>>,
26 = help: add bounds on type parameter `T` that satisfy `Mutex<Box<T>>: Send`
28 error: some fields in `ArcGuard<RC, T>` are not safe to be sent to another thread
29 --> $DIR/non_send_fields_in_send_ty.rs:32:1
31 LL | unsafe impl<RC, T: Send> Send for ArcGuard<RC, T> {}
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34 note: it is not safe to send field `head` to another thread
35 --> $DIR/non_send_fields_in_send_ty.rs:29:5
39 = help: add bounds on type parameter `RC` that satisfy `Arc<RC>: Send`
41 error: some fields in `DeviceHandle<T>` are not safe to be sent to another thread
42 --> $DIR/non_send_fields_in_send_ty.rs:48:1
44 LL | unsafe impl<T: UsbContext> Send for DeviceHandle<T> {}
45 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 note: it is not safe to send field `context` to another thread
48 --> $DIR/non_send_fields_in_send_ty.rs:44:5
52 = help: add `T: Send` bound in `Send` impl
54 error: some fields in `NoGeneric` are not safe to be sent to another thread
55 --> $DIR/non_send_fields_in_send_ty.rs:55:1
57 LL | unsafe impl Send for NoGeneric {}
58 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60 note: it is not safe to send field `rc_is_not_send` to another thread
61 --> $DIR/non_send_fields_in_send_ty.rs:52:5
63 LL | rc_is_not_send: Rc<String>,
64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
65 = help: use a thread-safe type that implements `Send`
67 error: some fields in `MultiField<T>` are not safe to be sent to another thread
68 --> $DIR/non_send_fields_in_send_ty.rs:63:1
70 LL | unsafe impl<T> Send for MultiField<T> {}
71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73 note: it is not safe to send field `field1` to another thread
74 --> $DIR/non_send_fields_in_send_ty.rs:58:5
78 = help: add `T: Send` bound in `Send` impl
79 note: it is not safe to send field `field2` to another thread
80 --> $DIR/non_send_fields_in_send_ty.rs:59:5
84 = help: add `T: Send` bound in `Send` impl
85 note: it is not safe to send field `field3` to another thread
86 --> $DIR/non_send_fields_in_send_ty.rs:60:5
90 = help: add `T: Send` bound in `Send` impl
92 error: some fields in `MyOption<T>` are not safe to be sent to another thread
93 --> $DIR/non_send_fields_in_send_ty.rs:70:1
95 LL | unsafe impl<T> Send for MyOption<T> {}
96 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98 note: it is not safe to send field `0` to another thread
99 --> $DIR/non_send_fields_in_send_ty.rs:66:12
103 = help: add `T: Send` bound in `Send` impl
105 error: some fields in `MultiParam<A, B>` are not safe to be sent to another thread
106 --> $DIR/non_send_fields_in_send_ty.rs:82:1
108 LL | unsafe impl<A, B> Send for MultiParam<A, B> {}
109 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111 note: it is not safe to send field `vec` to another thread
112 --> $DIR/non_send_fields_in_send_ty.rs:79:5
114 LL | vec: Vec<(A, B)>,
116 = help: add bounds on type parameters `A, B` that satisfy `Vec<(A, B)>: Send`
118 error: some fields in `HeuristicTest` are not safe to be sent to another thread
119 --> $DIR/non_send_fields_in_send_ty.rs:100:1
121 LL | unsafe impl Send for HeuristicTest {}
122 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124 note: it is not safe to send field `field4` to another thread
125 --> $DIR/non_send_fields_in_send_ty.rs:95:5
127 LL | field4: (*const NonSend, Rc<u8>),
128 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
129 = help: use a thread-safe type that implements `Send`
131 error: some fields in `AttrTest3<T>` are not safe to be sent to another thread
132 --> $DIR/non_send_fields_in_send_ty.rs:119:1
134 LL | unsafe impl<T> Send for AttrTest3<T> {}
135 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137 note: it is not safe to send field `0` to another thread
138 --> $DIR/non_send_fields_in_send_ty.rs:114:11
142 = help: add `T: Send` bound in `Send` impl
144 error: some fields in `Complex<P, u32>` are not safe to be sent to another thread
145 --> $DIR/non_send_fields_in_send_ty.rs:127:1
147 LL | unsafe impl<P> Send for Complex<P, u32> {}
148 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
150 note: it is not safe to send field `field1` to another thread
151 --> $DIR/non_send_fields_in_send_ty.rs:123:5
155 = help: add `P: Send` bound in `Send` impl
157 error: some fields in `Complex<Q, MutexGuard<'static, bool>>` are not safe to be sent to another thread
158 --> $DIR/non_send_fields_in_send_ty.rs:130:1
160 LL | unsafe impl<Q: Send> Send for Complex<Q, MutexGuard<'static, bool>> {}
161 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
163 note: it is not safe to send field `field2` to another thread
164 --> $DIR/non_send_fields_in_send_ty.rs:124:5
168 = help: use a thread-safe type that implements `Send`
170 error: aborting due to 12 previous errors