Skip to content

Commit c0fd250

Browse files
committed
Fix grammar issues
1 parent ee0d71e commit c0fd250

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

clippy_lints/src/non_send_fields_in_send_ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ declare_clippy_lint! {
1717
/// contains fields that are not safe to be sent across threads.
1818
/// It tries to detect fields that can cause a soundness issue
1919
/// when sent to another thread (e.g., `Rc`) while allowing `!Send` fields
20-
/// that are expected to exist in a `Send` type such as raw pointers.
20+
/// that are expected to exist in a `Send` type, such as raw pointers.
2121
///
2222
/// ### Why is this bad?
2323
/// Sending the struct to another thread effectively sends all of its fields,
@@ -124,7 +124,7 @@ impl<'tcx> LateLintPass<'tcx> for NonSendFieldInSendTy {
124124
NON_SEND_FIELDS_IN_SEND_TY,
125125
item.span,
126126
&format!(
127-
"there are some fields in `{}` are not safe to be sent to another thread",
127+
"some fields in `{}` are not safe to be sent to another thread",
128128
snippet(cx, hir_impl.self_ty.span, "Unknown")
129129
),
130130
|diag| {

tests/ui-toml/strict_non_send_fields_in_send_ty/test.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: there are some fields in `NoGeneric` are not safe to be sent to another thread
1+
error: some fields in `NoGeneric` are not safe to be sent to another thread
22
--> $DIR/test.rs:11:1
33
|
44
LL | unsafe impl Send for NoGeneric {}
@@ -12,7 +12,7 @@ LL | rc_is_not_send: Rc<String>,
1212
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
1313
= help: use a thread-safe type that implements `Send`
1414

15-
error: there are some fields in `MultiField<T>` are not safe to be sent to another thread
15+
error: some fields in `MultiField<T>` are not safe to be sent to another thread
1616
--> $DIR/test.rs:19:1
1717
|
1818
LL | unsafe impl<T> Send for MultiField<T> {}
@@ -37,7 +37,7 @@ LL | field3: T,
3737
| ^^^^^^^^^
3838
= help: add `T: Send` bound in `Send` impl
3939

40-
error: there are some fields in `MyOption<T>` are not safe to be sent to another thread
40+
error: some fields in `MyOption<T>` are not safe to be sent to another thread
4141
--> $DIR/test.rs:26:1
4242
|
4343
LL | unsafe impl<T> Send for MyOption<T> {}
@@ -50,7 +50,7 @@ LL | MySome(T),
5050
| ^
5151
= help: add `T: Send` bound in `Send` impl
5252

53-
error: there are some fields in `HeuristicTest` are not safe to be sent to another thread
53+
error: some fields in `HeuristicTest` are not safe to be sent to another thread
5454
--> $DIR/test.rs:41:1
5555
|
5656
LL | unsafe impl Send for HeuristicTest {}

tests/ui/non_send_fields_in_send_ty.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: there are some fields in `RingBuffer<T>` are not safe to be sent to another thread
1+
error: some fields in `RingBuffer<T>` are not safe to be sent to another thread
22
--> $DIR/non_send_fields_in_send_ty.rs:16:1
33
|
44
LL | unsafe impl<T> Send for RingBuffer<T> {}
@@ -12,7 +12,7 @@ LL | data: Vec<UnsafeCell<T>>,
1212
| ^^^^^^^^^^^^^^^^^^^^^^^^
1313
= help: add bounds on type parameter `T` that satisfy `Vec<UnsafeCell<T>>: Send`
1414

15-
error: there are some fields in `MvccRwLock<T>` are not safe to be sent to another thread
15+
error: some fields in `MvccRwLock<T>` are not safe to be sent to another thread
1616
--> $DIR/non_send_fields_in_send_ty.rs:24:1
1717
|
1818
LL | unsafe impl<T> Send for MvccRwLock<T> {}
@@ -25,7 +25,7 @@ LL | lock: Mutex<Box<T>>,
2525
| ^^^^^^^^^^^^^^^^^^^
2626
= help: add bounds on type parameter `T` that satisfy `Mutex<Box<T>>: Send`
2727

28-
error: there are some fields in `ArcGuard<RC, T>` are not safe to be sent to another thread
28+
error: some fields in `ArcGuard<RC, T>` are not safe to be sent to another thread
2929
--> $DIR/non_send_fields_in_send_ty.rs:32:1
3030
|
3131
LL | unsafe impl<RC, T: Send> Send for ArcGuard<RC, T> {}
@@ -38,7 +38,7 @@ LL | head: Arc<RC>,
3838
| ^^^^^^^^^^^^^
3939
= help: add bounds on type parameter `RC` that satisfy `Arc<RC>: Send`
4040

41-
error: there are some fields in `DeviceHandle<T>` are not safe to be sent to another thread
41+
error: some fields in `DeviceHandle<T>` are not safe to be sent to another thread
4242
--> $DIR/non_send_fields_in_send_ty.rs:48:1
4343
|
4444
LL | unsafe impl<T: UsbContext> Send for DeviceHandle<T> {}
@@ -51,7 +51,7 @@ LL | context: T,
5151
| ^^^^^^^^^^
5252
= help: add `T: Send` bound in `Send` impl
5353

54-
error: there are some fields in `NoGeneric` are not safe to be sent to another thread
54+
error: some fields in `NoGeneric` are not safe to be sent to another thread
5555
--> $DIR/non_send_fields_in_send_ty.rs:55:1
5656
|
5757
LL | unsafe impl Send for NoGeneric {}
@@ -64,7 +64,7 @@ LL | rc_is_not_send: Rc<String>,
6464
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6565
= help: use a thread-safe type that implements `Send`
6666

67-
error: there are some fields in `MultiField<T>` are not safe to be sent to another thread
67+
error: some fields in `MultiField<T>` are not safe to be sent to another thread
6868
--> $DIR/non_send_fields_in_send_ty.rs:63:1
6969
|
7070
LL | unsafe impl<T> Send for MultiField<T> {}
@@ -89,7 +89,7 @@ LL | field3: T,
8989
| ^^^^^^^^^
9090
= help: add `T: Send` bound in `Send` impl
9191

92-
error: there are some fields in `MyOption<T>` are not safe to be sent to another thread
92+
error: some fields in `MyOption<T>` are not safe to be sent to another thread
9393
--> $DIR/non_send_fields_in_send_ty.rs:70:1
9494
|
9595
LL | unsafe impl<T> Send for MyOption<T> {}
@@ -102,7 +102,7 @@ LL | MySome(T),
102102
| ^
103103
= help: add `T: Send` bound in `Send` impl
104104

105-
error: there are some fields in `MultiParam<A, B>` are not safe to be sent to another thread
105+
error: some fields in `MultiParam<A, B>` are not safe to be sent to another thread
106106
--> $DIR/non_send_fields_in_send_ty.rs:82:1
107107
|
108108
LL | unsafe impl<A, B> Send for MultiParam<A, B> {}
@@ -115,7 +115,7 @@ LL | vec: Vec<(A, B)>,
115115
| ^^^^^^^^^^^^^^^^
116116
= help: add bounds on type parameters `A, B` that satisfy `Vec<(A, B)>: Send`
117117

118-
error: there are some fields in `HeuristicTest` are not safe to be sent to another thread
118+
error: some fields in `HeuristicTest` are not safe to be sent to another thread
119119
--> $DIR/non_send_fields_in_send_ty.rs:100:1
120120
|
121121
LL | unsafe impl Send for HeuristicTest {}
@@ -128,7 +128,7 @@ LL | field4: (*const NonSend, Rc<u8>),
128128
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
129129
= help: use a thread-safe type that implements `Send`
130130

131-
error: there are some fields in `AttrTest3<T>` are not safe to be sent to another thread
131+
error: some fields in `AttrTest3<T>` are not safe to be sent to another thread
132132
--> $DIR/non_send_fields_in_send_ty.rs:119:1
133133
|
134134
LL | unsafe impl<T> Send for AttrTest3<T> {}
@@ -141,7 +141,7 @@ LL | Enum2(T),
141141
| ^
142142
= help: add `T: Send` bound in `Send` impl
143143

144-
error: there are some fields in `Complex<P, u32>` are not safe to be sent to another thread
144+
error: some fields in `Complex<P, u32>` are not safe to be sent to another thread
145145
--> $DIR/non_send_fields_in_send_ty.rs:127:1
146146
|
147147
LL | unsafe impl<P> Send for Complex<P, u32> {}
@@ -154,7 +154,7 @@ LL | field1: A,
154154
| ^^^^^^^^^
155155
= help: add `P: Send` bound in `Send` impl
156156

157-
error: there are some fields in `Complex<Q, MutexGuard<'static, bool>>` are not safe to be sent to another thread
157+
error: some fields in `Complex<Q, MutexGuard<'static, bool>>` are not safe to be sent to another thread
158158
--> $DIR/non_send_fields_in_send_ty.rs:130:1
159159
|
160160
LL | unsafe impl<Q: Send> Send for Complex<Q, MutexGuard<'static, bool>> {}

0 commit comments

Comments
 (0)