Skip to content

Commit 1ad04f4

Browse files
committed
Move non_send_fields_in_send_ty to suspicious
Also updated one configuration for nicer formatting
1 parent 73a443d commit 1ad04f4

6 files changed

+7
-5
lines changed

clippy_lints/src/lib.register_all.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
218218
LintId::of(non_copy_const::DECLARE_INTERIOR_MUTABLE_CONST),
219219
LintId::of(non_expressive_names::JUST_UNDERSCORES_AND_DIGITS),
220220
LintId::of(non_octal_unix_permissions::NON_OCTAL_UNIX_PERMISSIONS),
221+
LintId::of(non_send_fields_in_send_ty::NON_SEND_FIELDS_IN_SEND_TY),
221222
LintId::of(open_options::NONSENSICAL_OPEN_OPTIONS),
222223
LintId::of(option_env_unwrap::OPTION_ENV_UNWRAP),
223224
LintId::of(overflow_check_conditional::OVERFLOW_CHECK_CONDITIONAL),

clippy_lints/src/lib.register_nursery.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
1717
LintId::of(missing_const_for_fn::MISSING_CONST_FOR_FN),
1818
LintId::of(mutable_debug_assertion::DEBUG_ASSERT_WITH_MUT_CALL),
1919
LintId::of(mutex_atomic::MUTEX_INTEGER),
20-
LintId::of(non_send_fields_in_send_ty::NON_SEND_FIELDS_IN_SEND_TY),
2120
LintId::of(nonstandard_macro_braces::NONSTANDARD_MACRO_BRACES),
2221
LintId::of(option_if_let_else::OPTION_IF_LET_ELSE),
2322
LintId::of(path_buf_push_overwrite::PATH_BUF_PUSH_OVERWRITE),

clippy_lints/src/lib.register_suspicious.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ store.register_group(true, "clippy::suspicious", Some("clippy_suspicious"), vec!
1515
LintId::of(loops::MUT_RANGE_BOUND),
1616
LintId::of(methods::SUSPICIOUS_MAP),
1717
LintId::of(mut_key::MUTABLE_KEY_TYPE),
18+
LintId::of(non_send_fields_in_send_ty::NON_SEND_FIELDS_IN_SEND_TY),
1819
LintId::of(suspicious_trait_impl::SUSPICIOUS_ARITHMETIC_IMPL),
1920
LintId::of(suspicious_trait_impl::SUSPICIOUS_OP_ASSIGN_IMPL),
2021
])

clippy_lints/src/non_send_fields_in_send_ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ declare_clippy_lint! {
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`).
4646
pub NON_SEND_FIELDS_IN_SEND_TY,
47-
nursery,
47+
suspicious,
4848
"there is field that does not implement `Send` in a `Send` struct"
4949
}
5050

clippy_lints/src/utils/conf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ define_Conf! {
288288
///
289289
/// The list of imports to always rename, a fully qualified path followed by the rename.
290290
(enforced_import_renames: Vec<crate::utils::conf::Rename> = Vec::new()),
291-
/// Lint: RESTRICTED_SCRIPTS.
291+
/// Lint: DISALLOWED_SCRIPT_IDENTS.
292292
///
293293
/// The list of unicode scripts allowed to be used in the scope.
294-
(allowed_scripts: Vec<String> = vec!["Latin".to_string()]),
294+
(allowed_scripts: Vec<String> = ["Latin"].iter().map(ToString::to_string).collect()),
295295
/// Lint: NON_SEND_FIELDS_IN_SEND_TY.
296296
///
297297
/// Whether to apply the raw pointer heuristic to determine if a type is `Send`.

doc/adding_lints.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,8 @@ in the following steps:
564564
/// <The configuration field doc comment>
565565
(configuration_ident: Type = DefaultValue),
566566
```
567-
The doc comment will be automatically added to the lint documentation.
567+
The doc comment is automatically added to the documentation of the listed lints. The default
568+
value will be formatted using the `Debug` implementation of the type.
568569
2. Adding the configuration value to the lint impl struct:
569570
1. This first requires the definition of a lint impl struct. Lint impl structs are usually
570571
generated with the `declare_lint_pass!` macro. This struct needs to be defined manually

0 commit comments

Comments
 (0)