@@ -5,7 +5,7 @@ LL | unsafe impl<T> Send for RingBuffer<T> {}
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
|
7
7
= note: `-D clippy::non-send-field-in-send-ty` implied by `-D warnings`
8
- note: the field `data` has type `std::vec::Vec<std::cell::UnsafeCell<T>>` which is not ` Send`
8
+ note: the field `data` has type `std::vec::Vec<std::cell::UnsafeCell<T>>` which is `! Send`
9
9
--> $DIR/non_send_field_in_send_ty.rs:11:5
10
10
|
11
11
LL | data: Vec<UnsafeCell<T>>,
@@ -18,7 +18,7 @@ error: this implementation is unsound, as some fields in `MvccRwLock<T>` are `!S
18
18
LL | unsafe impl<T> Send for MvccRwLock<T> {}
19
19
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20
20
|
21
- note: the field `lock` has type `std::sync::Mutex<std::boxed::Box<T>>` which is not ` Send`
21
+ note: the field `lock` has type `std::sync::Mutex<std::boxed::Box<T>>` which is `! Send`
22
22
--> $DIR/non_send_field_in_send_ty.rs:21:5
23
23
|
24
24
LL | lock: Mutex<Box<T>>,
@@ -31,7 +31,7 @@ error: this implementation is unsound, as some fields in `ArcGuard<RC, T>` are `
31
31
LL | unsafe impl<RC, T: Send> Send for ArcGuard<RC, T> {}
32
32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33
33
|
34
- note: the field `head` has type `std::sync::Arc<RC>` which is not ` Send`
34
+ note: the field `head` has type `std::sync::Arc<RC>` which is `! Send`
35
35
--> $DIR/non_send_field_in_send_ty.rs:29:5
36
36
|
37
37
LL | head: Arc<RC>,
@@ -44,7 +44,7 @@ error: this implementation is unsound, as some fields in `DeviceHandle<T>` are `
44
44
LL | unsafe impl<T: UsbContext> Send for DeviceHandle<T> {}
45
45
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46
46
|
47
- note: the field `context` has type `T` which is not ` Send`
47
+ note: the field `context` has type `T` which is `! Send`
48
48
--> $DIR/non_send_field_in_send_ty.rs:44:5
49
49
|
50
50
LL | context: T,
@@ -57,7 +57,7 @@ error: this implementation is unsound, as some fields in `NoGeneric` are `!Send`
57
57
LL | unsafe impl Send for NoGeneric {}
58
58
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59
59
|
60
- note: the field `rc_is_not_send` has type `std::rc::Rc<std::string::String>` which is not ` Send`
60
+ note: the field `rc_is_not_send` has type `std::rc::Rc<std::string::String>` which is `! Send`
61
61
--> $DIR/non_send_field_in_send_ty.rs:52:5
62
62
|
63
63
LL | rc_is_not_send: Rc<String>,
@@ -70,19 +70,19 @@ error: this implementation is unsound, as some fields in `MultiField<T>` are `!S
70
70
LL | unsafe impl<T> Send for MultiField<T> {}
71
71
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
72
|
73
- note: the field `field1` has type `T` which is not ` Send`
73
+ note: the field `field1` has type `T` which is `! Send`
74
74
--> $DIR/non_send_field_in_send_ty.rs:58:5
75
75
|
76
76
LL | field1: T,
77
77
| ^^^^^^^^^
78
78
= help: add `T: Send` bound in `Send` impl
79
- note: the field `field2` has type `T` which is not ` Send`
79
+ note: the field `field2` has type `T` which is `! Send`
80
80
--> $DIR/non_send_field_in_send_ty.rs:59:5
81
81
|
82
82
LL | field2: T,
83
83
| ^^^^^^^^^
84
84
= help: add `T: Send` bound in `Send` impl
85
- note: the field `field3` has type `T` which is not ` Send`
85
+ note: the field `field3` has type `T` which is `! Send`
86
86
--> $DIR/non_send_field_in_send_ty.rs:60:5
87
87
|
88
88
LL | field3: T,
@@ -95,7 +95,7 @@ error: this implementation is unsound, as some fields in `MyOption<T>` are `!Sen
95
95
LL | unsafe impl<T> Send for MyOption<T> {}
96
96
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97
97
|
98
- note: the field `0` has type `T` which is not ` Send`
98
+ note: the field `0` has type `T` which is `! Send`
99
99
--> $DIR/non_send_field_in_send_ty.rs:66:12
100
100
|
101
101
LL | MySome(T),
@@ -108,7 +108,7 @@ error: this implementation is unsound, as some fields in `MultiParam<A, B>` are
108
108
LL | unsafe impl<A, B> Send for MultiParam<A, B> {}
109
109
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110
110
|
111
- note: the field `vec` has type `std::vec::Vec<(A, B)>` which is not ` Send`
111
+ note: the field `vec` has type `std::vec::Vec<(A, B)>` which is `! Send`
112
112
--> $DIR/non_send_field_in_send_ty.rs:74:5
113
113
|
114
114
LL | vec: Vec<(A, B)>,
@@ -121,7 +121,7 @@ error: this implementation is unsound, as some fields in `HeuristicTest` are `!S
121
121
LL | unsafe impl Send for HeuristicTest {}
122
122
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123
123
|
124
- note: the field `field4` has type `(*const NonSend, std::rc::Rc<u8>)` which is not ` Send`
124
+ note: the field `field4` has type `(*const NonSend, std::rc::Rc<u8>)` which is `! Send`
125
125
--> $DIR/non_send_field_in_send_ty.rs:90:5
126
126
|
127
127
LL | field4: (*const NonSend, Rc<u8>),
@@ -134,7 +134,7 @@ error: this implementation is unsound, as some fields in `AttrTest3<T>` are `!Se
134
134
LL | unsafe impl<T> Send for AttrTest3<T> {}
135
135
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136
136
|
137
- note: the field `0` has type `T` which is not ` Send`
137
+ note: the field `0` has type `T` which is `! Send`
138
138
--> $DIR/non_send_field_in_send_ty.rs:109:11
139
139
|
140
140
LL | Enum2(T),
@@ -147,7 +147,7 @@ error: this implementation is unsound, as some fields in `Complex<P, u32>` are `
147
147
LL | unsafe impl<P> Send for Complex<P, u32> {}
148
148
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149
149
|
150
- note: the field `field1` has type `P` which is not ` Send`
150
+ note: the field `field1` has type `P` which is `! Send`
151
151
--> $DIR/non_send_field_in_send_ty.rs:118:5
152
152
|
153
153
LL | field1: A,
@@ -160,7 +160,7 @@ error: this implementation is unsound, as some fields in `Complex<Q, std::sync::
160
160
LL | unsafe impl<Q: Send> Send for Complex<Q, MutexGuard<'static, bool>> {}
161
161
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
162
162
|
163
- note: the field `field2` has type `std::sync::MutexGuard<'static, bool>` which is not ` Send`
163
+ note: the field `field2` has type `std::sync::MutexGuard<'static, bool>` which is `! Send`
164
164
--> $DIR/non_send_field_in_send_ty.rs:119:5
165
165
|
166
166
LL | field2: B,
0 commit comments