Skip to content

Commit 961cbb5

Browse files
committed
Auto merge of #121327 - Nilstrieb:rollup-zxcwwwy, r=Nilstrieb
Rollup of 10 pull requests Successful merges: - #120716 (Change leak check and suspicious auto trait lint warning messages) - #121195 (unstable-book: Separate testing and production sanitizers) - #121205 (Merge `CompilerError::CompilationFailed` and `CompilerError::ICE`.) - #121233 (Move the extra directives for `Mode::CoverageRun` into `iter_header`) - #121256 (Allow AST and HIR visitors to return `ControlFlow`) - #121307 (Drive-by `DUMMY_SP` -> `Span` and fmt changes) - #121308 (Add regression test for #103369) - #121310 (Remove an old hack for rustdoc) - #121311 (Make `is_nonoverlapping` `#[inline]`) - #121319 (return `ty::Error` when equating `ty::Error`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 2c8d89f + 0b5b48d commit 961cbb5

File tree

2 files changed

+26
-27
lines changed

2 files changed

+26
-27
lines changed

tests/ui/non_send_fields_in_send_ty.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![warn(clippy::non_send_fields_in_send_ty)]
2-
#![allow(suspicious_auto_trait_impls)]
32
#![feature(extern_types)]
43

54
use std::cell::UnsafeCell;

tests/ui/non_send_fields_in_send_ty.stderr

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: some fields in `RingBuffer<T>` are not safe to be sent to another thread
2-
--> $DIR/non_send_fields_in_send_ty.rs:17:1
2+
--> $DIR/non_send_fields_in_send_ty.rs:16:1
33
|
44
LL | unsafe impl<T> Send for RingBuffer<T> {}
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
note: it is not safe to send field `data` to another thread
8-
--> $DIR/non_send_fields_in_send_ty.rs:12:5
8+
--> $DIR/non_send_fields_in_send_ty.rs:11:5
99
|
1010
LL | data: Vec<UnsafeCell<T>>,
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -14,155 +14,155 @@ LL | data: Vec<UnsafeCell<T>>,
1414
= help: to override `-D warnings` add `#[allow(clippy::non_send_fields_in_send_ty)]`
1515

1616
error: some fields in `MvccRwLock<T>` are not safe to be sent to another thread
17-
--> $DIR/non_send_fields_in_send_ty.rs:26:1
17+
--> $DIR/non_send_fields_in_send_ty.rs:25:1
1818
|
1919
LL | unsafe impl<T> Send for MvccRwLock<T> {}
2020
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2121
|
2222
note: it is not safe to send field `lock` to another thread
23-
--> $DIR/non_send_fields_in_send_ty.rs:23:5
23+
--> $DIR/non_send_fields_in_send_ty.rs:22:5
2424
|
2525
LL | lock: Mutex<Box<T>>,
2626
| ^^^^^^^^^^^^^^^^^^^
2727
= help: add bounds on type parameter `T` that satisfy `Mutex<Box<T>>: Send`
2828

2929
error: some fields in `ArcGuard<RC, T>` are not safe to be sent to another thread
30-
--> $DIR/non_send_fields_in_send_ty.rs:35:1
30+
--> $DIR/non_send_fields_in_send_ty.rs:34:1
3131
|
3232
LL | unsafe impl<RC, T: Send> Send for ArcGuard<RC, T> {}
3333
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3434
|
3535
note: it is not safe to send field `head` to another thread
36-
--> $DIR/non_send_fields_in_send_ty.rs:32:5
36+
--> $DIR/non_send_fields_in_send_ty.rs:31:5
3737
|
3838
LL | head: Arc<RC>,
3939
| ^^^^^^^^^^^^^
4040
= help: add bounds on type parameter `RC` that satisfy `Arc<RC>: Send`
4141

4242
error: some fields in `DeviceHandle<T>` are not safe to be sent to another thread
43-
--> $DIR/non_send_fields_in_send_ty.rs:52:1
43+
--> $DIR/non_send_fields_in_send_ty.rs:51:1
4444
|
4545
LL | unsafe impl<T: UsbContext> Send for DeviceHandle<T> {}
4646
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4747
|
4848
note: it is not safe to send field `context` to another thread
49-
--> $DIR/non_send_fields_in_send_ty.rs:48:5
49+
--> $DIR/non_send_fields_in_send_ty.rs:47:5
5050
|
5151
LL | context: T,
5252
| ^^^^^^^^^^
5353
= help: add `T: Send` bound in `Send` impl
5454

5555
error: some fields in `NoGeneric` are not safe to be sent to another thread
56-
--> $DIR/non_send_fields_in_send_ty.rs:60:1
56+
--> $DIR/non_send_fields_in_send_ty.rs:59:1
5757
|
5858
LL | unsafe impl Send for NoGeneric {}
5959
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6060
|
6161
note: it is not safe to send field `rc_is_not_send` to another thread
62-
--> $DIR/non_send_fields_in_send_ty.rs:57:5
62+
--> $DIR/non_send_fields_in_send_ty.rs:56:5
6363
|
6464
LL | rc_is_not_send: Rc<String>,
6565
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6666
= help: use a thread-safe type that implements `Send`
6767

6868
error: some fields in `MultiField<T>` are not safe to be sent to another thread
69-
--> $DIR/non_send_fields_in_send_ty.rs:69:1
69+
--> $DIR/non_send_fields_in_send_ty.rs:68:1
7070
|
7171
LL | unsafe impl<T> Send for MultiField<T> {}
7272
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7373
|
7474
note: it is not safe to send field `field1` to another thread
75-
--> $DIR/non_send_fields_in_send_ty.rs:64:5
75+
--> $DIR/non_send_fields_in_send_ty.rs:63:5
7676
|
7777
LL | field1: T,
7878
| ^^^^^^^^^
7979
= help: add `T: Send` bound in `Send` impl
8080
note: it is not safe to send field `field2` to another thread
81-
--> $DIR/non_send_fields_in_send_ty.rs:65:5
81+
--> $DIR/non_send_fields_in_send_ty.rs:64:5
8282
|
8383
LL | field2: T,
8484
| ^^^^^^^^^
8585
= help: add `T: Send` bound in `Send` impl
8686
note: it is not safe to send field `field3` to another thread
87-
--> $DIR/non_send_fields_in_send_ty.rs:66:5
87+
--> $DIR/non_send_fields_in_send_ty.rs:65:5
8888
|
8989
LL | field3: T,
9090
| ^^^^^^^^^
9191
= help: add `T: Send` bound in `Send` impl
9292

9393
error: some fields in `MyOption<T>` are not safe to be sent to another thread
94-
--> $DIR/non_send_fields_in_send_ty.rs:77:1
94+
--> $DIR/non_send_fields_in_send_ty.rs:76:1
9595
|
9696
LL | unsafe impl<T> Send for MyOption<T> {}
9797
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9898
|
9999
note: it is not safe to send field `0` to another thread
100-
--> $DIR/non_send_fields_in_send_ty.rs:73:12
100+
--> $DIR/non_send_fields_in_send_ty.rs:72:12
101101
|
102102
LL | MySome(T),
103103
| ^
104104
= help: add `T: Send` bound in `Send` impl
105105

106106
error: some fields in `MultiParam<A, B>` are not safe to be sent to another thread
107-
--> $DIR/non_send_fields_in_send_ty.rs:90:1
107+
--> $DIR/non_send_fields_in_send_ty.rs:89:1
108108
|
109109
LL | unsafe impl<A, B> Send for MultiParam<A, B> {}
110110
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111111
|
112112
note: it is not safe to send field `vec` to another thread
113-
--> $DIR/non_send_fields_in_send_ty.rs:87:5
113+
--> $DIR/non_send_fields_in_send_ty.rs:86:5
114114
|
115115
LL | vec: Vec<(A, B)>,
116116
| ^^^^^^^^^^^^^^^^
117117
= help: add bounds on type parameters `A, B` that satisfy `Vec<(A, B)>: Send`
118118

119119
error: some fields in `HeuristicTest` are not safe to be sent to another thread
120-
--> $DIR/non_send_fields_in_send_ty.rs:109:1
120+
--> $DIR/non_send_fields_in_send_ty.rs:108:1
121121
|
122122
LL | unsafe impl Send for HeuristicTest {}
123123
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124124
|
125125
note: it is not safe to send field `field4` to another thread
126-
--> $DIR/non_send_fields_in_send_ty.rs:104:5
126+
--> $DIR/non_send_fields_in_send_ty.rs:103:5
127127
|
128128
LL | field4: (*const NonSend, Rc<u8>),
129129
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130130
= help: use a thread-safe type that implements `Send`
131131

132132
error: some fields in `AttrTest3<T>` are not safe to be sent to another thread
133-
--> $DIR/non_send_fields_in_send_ty.rs:129:1
133+
--> $DIR/non_send_fields_in_send_ty.rs:128:1
134134
|
135135
LL | unsafe impl<T> Send for AttrTest3<T> {}
136136
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137137
|
138138
note: it is not safe to send field `0` to another thread
139-
--> $DIR/non_send_fields_in_send_ty.rs:124:11
139+
--> $DIR/non_send_fields_in_send_ty.rs:123:11
140140
|
141141
LL | Enum2(T),
142142
| ^
143143
= help: add `T: Send` bound in `Send` impl
144144

145145
error: some fields in `Complex<P, u32>` are not safe to be sent to another thread
146-
--> $DIR/non_send_fields_in_send_ty.rs:138:1
146+
--> $DIR/non_send_fields_in_send_ty.rs:137:1
147147
|
148148
LL | unsafe impl<P> Send for Complex<P, u32> {}
149149
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
150150
|
151151
note: it is not safe to send field `field1` to another thread
152-
--> $DIR/non_send_fields_in_send_ty.rs:134:5
152+
--> $DIR/non_send_fields_in_send_ty.rs:133:5
153153
|
154154
LL | field1: A,
155155
| ^^^^^^^^^
156156
= help: add `P: Send` bound in `Send` impl
157157

158158
error: some fields in `Complex<Q, MutexGuard<'static, bool>>` are not safe to be sent to another thread
159-
--> $DIR/non_send_fields_in_send_ty.rs:142:1
159+
--> $DIR/non_send_fields_in_send_ty.rs:141:1
160160
|
161161
LL | unsafe impl<Q: Send> Send for Complex<Q, MutexGuard<'static, bool>> {}
162162
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
163163
|
164164
note: it is not safe to send field `field2` to another thread
165-
--> $DIR/non_send_fields_in_send_ty.rs:135:5
165+
--> $DIR/non_send_fields_in_send_ty.rs:134:5
166166
|
167167
LL | field2: B,
168168
| ^^^^^^^^^

0 commit comments

Comments
 (0)