@@ -12,7 +12,7 @@ use rustc_span::sym;
1212
1313declare_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
6666impl < ' 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`" ,
0 commit comments