summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/non_send_fields_in_send_ty.stderr
blob: b6c904a147a5f4da727b9e75b70c94ced79ad607 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
error: some fields in `RingBuffer<T>` are not safe to be sent to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:17:1
   |
LL | unsafe impl<T> Send for RingBuffer<T> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings`
note: it is not safe to send field `data` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:12:5
   |
LL |     data: Vec<UnsafeCell<T>>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^
   = help: add bounds on type parameter `T` that satisfy `Vec<UnsafeCell<T>>: Send`

error: some fields in `MvccRwLock<T>` are not safe to be sent to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:25:1
   |
LL | unsafe impl<T> Send for MvccRwLock<T> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `lock` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:22:5
   |
LL |     lock: Mutex<Box<T>>,
   |     ^^^^^^^^^^^^^^^^^^^
   = help: add bounds on type parameter `T` that satisfy `Mutex<Box<T>>: Send`

error: some fields in `ArcGuard<RC, T>` are not safe to be sent to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:33:1
   |
LL | unsafe impl<RC, T: Send> Send for ArcGuard<RC, T> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `head` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:30:5
   |
LL |     head: Arc<RC>,
   |     ^^^^^^^^^^^^^
   = help: add bounds on type parameter `RC` that satisfy `Arc<RC>: Send`

error: some fields in `DeviceHandle<T>` are not safe to be sent to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:49:1
   |
LL | unsafe impl<T: UsbContext> Send for DeviceHandle<T> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `context` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:45:5
   |
LL |     context: T,
   |     ^^^^^^^^^^
   = help: add `T: Send` bound in `Send` impl

error: some fields in `NoGeneric` are not safe to be sent to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:56:1
   |
LL | unsafe impl Send for NoGeneric {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `rc_is_not_send` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:53:5
   |
LL |     rc_is_not_send: Rc<String>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: use a thread-safe type that implements `Send`

error: some fields in `MultiField<T>` are not safe to be sent to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:64:1
   |
LL | unsafe impl<T> Send for MultiField<T> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `field1` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:59:5
   |
LL |     field1: T,
   |     ^^^^^^^^^
   = help: add `T: Send` bound in `Send` impl
note: it is not safe to send field `field2` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:60:5
   |
LL |     field2: T,
   |     ^^^^^^^^^
   = help: add `T: Send` bound in `Send` impl
note: it is not safe to send field `field3` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:61:5
   |
LL |     field3: T,
   |     ^^^^^^^^^
   = help: add `T: Send` bound in `Send` impl

error: some fields in `MyOption<T>` are not safe to be sent to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:71:1
   |
LL | unsafe impl<T> Send for MyOption<T> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `0` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:67:12
   |
LL |     MySome(T),
   |            ^
   = help: add `T: Send` bound in `Send` impl

error: some fields in `MultiParam<A, B>` are not safe to be sent to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:83:1
   |
LL | unsafe impl<A, B> Send for MultiParam<A, B> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `vec` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:80:5
   |
LL |     vec: Vec<(A, B)>,
   |     ^^^^^^^^^^^^^^^^
   = help: add bounds on type parameters `A, B` that satisfy `Vec<(A, B)>: Send`

error: some fields in `HeuristicTest` are not safe to be sent to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:101:1
   |
LL | unsafe impl Send for HeuristicTest {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `field4` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:96:5
   |
LL |     field4: (*const NonSend, Rc<u8>),
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: use a thread-safe type that implements `Send`

error: some fields in `AttrTest3<T>` are not safe to be sent to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:120:1
   |
LL | unsafe impl<T> Send for AttrTest3<T> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `0` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:115:11
   |
LL |     Enum2(T),
   |           ^
   = help: add `T: Send` bound in `Send` impl

error: some fields in `Complex<P, u32>` are not safe to be sent to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:128:1
   |
LL | unsafe impl<P> Send for Complex<P, u32> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `field1` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:124:5
   |
LL |     field1: A,
   |     ^^^^^^^^^
   = help: add `P: Send` bound in `Send` impl

error: some fields in `Complex<Q, MutexGuard<'static, bool>>` are not safe to be sent to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:131:1
   |
LL | unsafe impl<Q: Send> Send for Complex<Q, MutexGuard<'static, bool>> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `field2` to another thread
  --> $DIR/non_send_fields_in_send_ty.rs:125:5
   |
LL |     field2: B,
   |     ^^^^^^^^^
   = help: use a thread-safe type that implements `Send`

error: aborting due to 12 previous errors