]> git.lizzy.rs Git - rust.git/blob - tests/ui/non_send_fields_in_send_ty.stderr
Consider NonNull as a pointer type
[rust.git] / tests / ui / non_send_fields_in_send_ty.stderr
1 error: this implementation is unsound, as some fields in `RingBuffer<T>` are `!Send`
2   --> $DIR/non_send_fields_in_send_ty.rs:16:1
3    |
4 LL | unsafe impl<T> Send for RingBuffer<T> {}
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings`
8 note: the type of field `data` is `!Send`
9   --> $DIR/non_send_fields_in_send_ty.rs:11:5
10    |
11 LL |     data: Vec<UnsafeCell<T>>,
12    |     ^^^^^^^^^^^^^^^^^^^^^^^^
13    = help: add bounds on type parameter `T` that satisfy `Vec<UnsafeCell<T>>: Send`
14
15 error: this implementation is unsound, as some fields in `MvccRwLock<T>` are `!Send`
16   --> $DIR/non_send_fields_in_send_ty.rs:24:1
17    |
18 LL | unsafe impl<T> Send for MvccRwLock<T> {}
19    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20    |
21 note: the type of field `lock` is `!Send`
22   --> $DIR/non_send_fields_in_send_ty.rs:21:5
23    |
24 LL |     lock: Mutex<Box<T>>,
25    |     ^^^^^^^^^^^^^^^^^^^
26    = help: add bounds on type parameter `T` that satisfy `Mutex<Box<T>>: Send`
27
28 error: this implementation is unsound, as some fields in `ArcGuard<RC, T>` are `!Send`
29   --> $DIR/non_send_fields_in_send_ty.rs:32:1
30    |
31 LL | unsafe impl<RC, T: Send> Send for ArcGuard<RC, T> {}
32    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33    |
34 note: the type of field `head` is `!Send`
35   --> $DIR/non_send_fields_in_send_ty.rs:29:5
36    |
37 LL |     head: Arc<RC>,
38    |     ^^^^^^^^^^^^^
39    = help: add bounds on type parameter `RC` that satisfy `Arc<RC>: Send`
40
41 error: this implementation is unsound, as some fields in `DeviceHandle<T>` are `!Send`
42   --> $DIR/non_send_fields_in_send_ty.rs:48:1
43    |
44 LL | unsafe impl<T: UsbContext> Send for DeviceHandle<T> {}
45    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46    |
47 note: the type of field `context` is `!Send`
48   --> $DIR/non_send_fields_in_send_ty.rs:44:5
49    |
50 LL |     context: T,
51    |     ^^^^^^^^^^
52    = help: add `T: Send` bound in `Send` impl
53
54 error: this implementation is unsound, as some fields in `NoGeneric` are `!Send`
55   --> $DIR/non_send_fields_in_send_ty.rs:55:1
56    |
57 LL | unsafe impl Send for NoGeneric {}
58    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59    |
60 note: the type of field `rc_is_not_send` is `!Send`
61   --> $DIR/non_send_fields_in_send_ty.rs:52:5
62    |
63 LL |     rc_is_not_send: Rc<String>,
64    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
65    = help: use a thread-safe type that implements `Send`
66
67 error: this implementation is unsound, as some fields in `MultiField<T>` are `!Send`
68   --> $DIR/non_send_fields_in_send_ty.rs:63:1
69    |
70 LL | unsafe impl<T> Send for MultiField<T> {}
71    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72    |
73 note: the type of field `field1` is `!Send`
74   --> $DIR/non_send_fields_in_send_ty.rs:58:5
75    |
76 LL |     field1: T,
77    |     ^^^^^^^^^
78    = help: add `T: Send` bound in `Send` impl
79 note: the type of field `field2` is `!Send`
80   --> $DIR/non_send_fields_in_send_ty.rs:59:5
81    |
82 LL |     field2: T,
83    |     ^^^^^^^^^
84    = help: add `T: Send` bound in `Send` impl
85 note: the type of field `field3` is `!Send`
86   --> $DIR/non_send_fields_in_send_ty.rs:60:5
87    |
88 LL |     field3: T,
89    |     ^^^^^^^^^
90    = help: add `T: Send` bound in `Send` impl
91
92 error: this implementation is unsound, as some fields in `MyOption<T>` are `!Send`
93   --> $DIR/non_send_fields_in_send_ty.rs:70:1
94    |
95 LL | unsafe impl<T> Send for MyOption<T> {}
96    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97    |
98 note: the type of field `0` is `!Send`
99   --> $DIR/non_send_fields_in_send_ty.rs:66:12
100    |
101 LL |     MySome(T),
102    |            ^
103    = help: add `T: Send` bound in `Send` impl
104
105 error: this implementation is unsound, as some fields in `MultiParam<A, B>` are `!Send`
106   --> $DIR/non_send_fields_in_send_ty.rs:82:1
107    |
108 LL | unsafe impl<A, B> Send for MultiParam<A, B> {}
109    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110    |
111 note: the type of field `vec` is `!Send`
112   --> $DIR/non_send_fields_in_send_ty.rs:79:5
113    |
114 LL |     vec: Vec<(A, B)>,
115    |     ^^^^^^^^^^^^^^^^
116    = help: add bounds on type parameters `A, B` that satisfy `Vec<(A, B)>: Send`
117
118 error: this implementation is unsound, as some fields in `HeuristicTest` are `!Send`
119   --> $DIR/non_send_fields_in_send_ty.rs:100:1
120    |
121 LL | unsafe impl Send for HeuristicTest {}
122    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123    |
124 note: the type of field `field4` is `!Send`
125   --> $DIR/non_send_fields_in_send_ty.rs:95:5
126    |
127 LL |     field4: (*const NonSend, Rc<u8>),
128    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
129    = help: use a thread-safe type that implements `Send`
130
131 error: this implementation is unsound, as some fields in `AttrTest3<T>` are `!Send`
132   --> $DIR/non_send_fields_in_send_ty.rs:119:1
133    |
134 LL | unsafe impl<T> Send for AttrTest3<T> {}
135    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136    |
137 note: the type of field `0` is `!Send`
138   --> $DIR/non_send_fields_in_send_ty.rs:114:11
139    |
140 LL |     Enum2(T),
141    |           ^
142    = help: add `T: Send` bound in `Send` impl
143
144 error: this implementation is unsound, as some fields in `Complex<P, u32>` are `!Send`
145   --> $DIR/non_send_fields_in_send_ty.rs:127:1
146    |
147 LL | unsafe impl<P> Send for Complex<P, u32> {}
148    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149    |
150 note: the type of field `field1` is `!Send`
151   --> $DIR/non_send_fields_in_send_ty.rs:123:5
152    |
153 LL |     field1: A,
154    |     ^^^^^^^^^
155    = help: add `P: Send` bound in `Send` impl
156
157 error: this implementation is unsound, as some fields in `Complex<Q, MutexGuard<'static, bool>>` are `!Send`
158   --> $DIR/non_send_fields_in_send_ty.rs:130:1
159    |
160 LL | unsafe impl<Q: Send> Send for Complex<Q, MutexGuard<'static, bool>> {}
161    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
162    |
163 note: the type of field `field2` is `!Send`
164   --> $DIR/non_send_fields_in_send_ty.rs:124:5
165    |
166 LL |     field2: B,
167    |     ^^^^^^^^^
168    = help: use a thread-safe type that implements `Send`
169
170 error: aborting due to 12 previous errors
171