Skip to content

Commit b7f53c2

Browse files
committed
Enable tuple_array_conversions
1 parent 59b7dd8 commit b7f53c2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

clippy_lints/src/arc_with_non_send_sync.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,10 @@ impl<'tcx> LateLintPass<'tcx> for ArcWithNonSendSync {
5454
})
5555
&& let Some(send) = cx.tcx.get_diagnostic_item(sym::Send)
5656
&& let Some(sync) = cx.tcx.lang_items().sync_trait()
57-
&& let [is_send, is_sync] = [send, sync].map(|id| implements_trait(cx, arg_ty, id, &[]))
58-
&& let reason = match (is_send, is_sync) {
59-
(false, false) => "neither `Send` nor `Sync`",
60-
(false, true) => "not `Send`",
61-
(true, false) => "not `Sync`",
57+
&& let reason = match [send, sync].map(|id| implements_trait(cx, arg_ty, id, &[])) {
58+
[false, false] => "neither `Send` nor `Sync`",
59+
[false, true] => "not `Send`",
60+
[true, false] => "not `Sync`",
6261
_ => return,
6362
}
6463
&& !is_from_proc_macro(cx, expr)

tests/dogfood.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ fn run_clippy_for_package(project: &str) -> bool {
9797
"clippy::needless_pass_by_ref_mut",
9898
"-D",
9999
"clippy::significant_drop_tightening",
100+
"-D",
101+
"clippy::tuple_array_conversions",
100102
]);
101103
if !cfg!(feature = "internal") {
102104
// running a clippy built without internal lints on the clippy source

0 commit comments

Comments
 (0)