Skip to content

Commit fb0353b

Browse files
committed
Update documentation and name for non_send_fields_in_send_ty lint
1 parent ef8df9d commit fb0353b

File tree

12 files changed

+45
-45
lines changed

12 files changed

+45
-45
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2898,7 +2898,7 @@ Released 2018-09-13
28982898
[`no_effect`]: https://rust-lang.github.io/rust-clippy/master/index.html#no_effect
28992899
[`non_ascii_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
29002900
[`non_octal_unix_permissions`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_octal_unix_permissions
2901-
[`non_send_field_in_send_ty`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_send_field_in_send_ty
2901+
[`non_send_fields_in_send_ty`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_send_fields_in_send_ty
29022902
[`nonminimal_bool`]: https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
29032903
[`nonsensical_open_options`]: https://rust-lang.github.io/rust-clippy/master/index.html#nonsensical_open_options
29042904
[`nonstandard_macro_braces`]: https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces

clippy_lints/src/lib.mods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ mod no_effect;
149149
mod non_copy_const;
150150
mod non_expressive_names;
151151
mod non_octal_unix_permissions;
152-
mod non_send_field_in_send_ty;
152+
mod non_send_fields_in_send_ty;
153153
mod nonstandard_macro_braces;
154154
mod open_options;
155155
mod option_env_unwrap;

clippy_lints/src/lib.register_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ store.register_lints(&[
366366
non_expressive_names::MANY_SINGLE_CHAR_NAMES,
367367
non_expressive_names::SIMILAR_NAMES,
368368
non_octal_unix_permissions::NON_OCTAL_UNIX_PERMISSIONS,
369-
non_send_field_in_send_ty::NON_SEND_FIELD_IN_SEND_TY,
369+
non_send_fields_in_send_ty::NON_SEND_FIELDS_IN_SEND_TY,
370370
nonstandard_macro_braces::NONSTANDARD_MACRO_BRACES,
371371
open_options::NONSENSICAL_OPEN_OPTIONS,
372372
option_env_unwrap::OPTION_ENV_UNWRAP,

clippy_lints/src/lib.register_nursery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
1616
LintId::of(missing_const_for_fn::MISSING_CONST_FOR_FN),
1717
LintId::of(mutable_debug_assertion::DEBUG_ASSERT_WITH_MUT_CALL),
1818
LintId::of(mutex_atomic::MUTEX_INTEGER),
19-
LintId::of(non_send_field_in_send_ty::NON_SEND_FIELD_IN_SEND_TY),
19+
LintId::of(non_send_fields_in_send_ty::NON_SEND_FIELDS_IN_SEND_TY),
2020
LintId::of(nonstandard_macro_braces::NONSTANDARD_MACRO_BRACES),
2121
LintId::of(option_if_let_else::OPTION_IF_LET_ELSE),
2222
LintId::of(path_buf_push_overwrite::PATH_BUF_PUSH_OVERWRITE),

clippy_lints/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
536536
store.register_late_pass(move || Box::new(iter_not_returning_iterator::IterNotReturningIterator));
537537
store.register_late_pass(move || Box::new(if_then_panic::IfThenPanic));
538538
let enable_raw_pointer_heuristic_for_send = conf.enable_raw_pointer_heuristic_for_send;
539-
store.register_late_pass(move || Box::new(non_send_field_in_send_ty::NonSendFieldInSendTy::new(enable_raw_pointer_heuristic_for_send)));
539+
store.register_late_pass(move || Box::new(non_send_fields_in_send_ty::NonSendFieldInSendTy::new(enable_raw_pointer_heuristic_for_send)));
540540
}
541541

542542
#[rustfmt::skip]

clippy_lints/src/non_send_field_in_send_ty.rs renamed to clippy_lints/src/non_send_fields_in_send_ty.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use rustc_span::sym;
1212

1313
declare_clippy_lint! {
1414
/// ### What it does
15-
/// Warns about a field in a `Send` struct that is neither `Send` nor `Copy`.
15+
/// Warns about fields in struct implementing `Send` that are neither `Send` nor `Copy`.
1616
///
1717
/// ### Why is this bad?
1818
/// Sending the struct to another thread will transfer the ownership to
@@ -43,7 +43,7 @@ declare_clippy_lint! {
4343
/// ```
4444
/// Use thread-safe types like [`std::sync::Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html)
4545
/// or specify correct bounds on generic type parameters (`T: Send`).
46-
pub NON_SEND_FIELD_IN_SEND_TY,
46+
pub NON_SEND_FIELDS_IN_SEND_TY,
4747
nursery,
4848
"there is field that does not implement `Send` in a `Send` struct"
4949
}
@@ -61,7 +61,7 @@ impl NonSendFieldInSendTy {
6161
}
6262
}
6363

64-
impl_lint_pass!(NonSendFieldInSendTy => [NON_SEND_FIELD_IN_SEND_TY]);
64+
impl_lint_pass!(NonSendFieldInSendTy => [NON_SEND_FIELDS_IN_SEND_TY]);
6565

6666
impl<'tcx> LateLintPass<'tcx> for NonSendFieldInSendTy {
6767
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
@@ -96,7 +96,7 @@ impl<'tcx> LateLintPass<'tcx> for NonSendFieldInSendTy {
9696
.did
9797
.as_local()
9898
.map(|local_def_id| hir_map.local_def_id_to_hir_id(local_def_id));
99-
if !is_lint_allowed(cx, NON_SEND_FIELD_IN_SEND_TY, field_hir_id);
99+
if !is_lint_allowed(cx, NON_SEND_FIELDS_IN_SEND_TY, field_hir_id);
100100
if let field_ty = field.ty(cx.tcx, impl_trait_substs);
101101
if !ty_allowed_in_send(cx, field_ty, send_trait);
102102
if let Node::Field(field_def) = hir_map.get(field_hir_id);
@@ -114,7 +114,7 @@ impl<'tcx> LateLintPass<'tcx> for NonSendFieldInSendTy {
114114
if !non_send_fields.is_empty() {
115115
span_lint_and_then(
116116
cx,
117-
NON_SEND_FIELD_IN_SEND_TY,
117+
NON_SEND_FIELDS_IN_SEND_TY,
118118
item.span,
119119
&format!(
120120
"this implementation is unsound, as some fields in `{}` are `!Send`",

clippy_lints/src/utils/conf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,9 @@ define_Conf! {
284284
///
285285
/// The list of unicode scripts allowed to be used in the scope.
286286
(allowed_scripts: Vec<String> = vec!["Latin".to_string()]),
287-
/// Lint: NON_SEND_FIELD_IN_SEND_TY.
287+
/// Lint: NON_SEND_FIELDS_IN_SEND_TY.
288288
///
289-
/// Whether to apply the raw pointer heuristic in `non_send_field_in_send_ty` lint.
289+
/// Whether to apply the raw pointer heuristic to determine if a type is `Send`.
290290
(enable_raw_pointer_heuristic_for_send: bool = true),
291291
}
292292

tests/ui-toml/strict_non_send_field_in_send_ty/test.rs renamed to tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![warn(clippy::non_send_field_in_send_ty)]
1+
#![warn(clippy::non_send_fields_in_send_ty)]
22
#![feature(extern_types)]
33

44
use std::rc::Rc;

tests/ui-toml/strict_non_send_field_in_send_ty/test.stderr renamed to tests/ui-toml/strict_non_send_fields_in_send_ty/test.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: this implementation is unsound, as some fields in `NoGeneric` are `!Send`
44
LL | unsafe impl Send for NoGeneric {}
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: `-D clippy::non-send-field-in-send-ty` implied by `-D warnings`
7+
= note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings`
88
note: the type of field `rc_is_not_send` is `!Send`
99
--> $DIR/test.rs:8:5
1010
|

0 commit comments

Comments
 (0)