Skip to content

Commit 09ac14c

Browse files
committedNov 2, 2023
Auto merge of #11747 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
2 parents 01a0a36 + 62a82b3 commit 09ac14c

File tree

167 files changed

+1834
-1501
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+1834
-1501
lines changed
 

‎clippy_lints/src/almost_complete_range.rs

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -82,33 +82,20 @@ fn check_range(cx: &EarlyContext<'_>, span: Span, start: &Expr, end: &Expr, sugg
8282
(
8383
Ok(LitKind::Byte(b'a') | LitKind::Char('a')),
8484
Ok(LitKind::Byte(b'z') | LitKind::Char('z'))
85-
)
86-
| (
85+
) | (
8786
Ok(LitKind::Byte(b'A') | LitKind::Char('A')),
8887
Ok(LitKind::Byte(b'Z') | LitKind::Char('Z')),
89-
)
90-
| (
88+
) | (
9189
Ok(LitKind::Byte(b'0') | LitKind::Char('0')),
9290
Ok(LitKind::Byte(b'9') | LitKind::Char('9')),
9391
)
9492
)
9593
&& !in_external_macro(cx.sess(), span)
9694
{
97-
span_lint_and_then(
98-
cx,
99-
ALMOST_COMPLETE_RANGE,
100-
span,
101-
"almost complete ascii range",
102-
|diag| {
103-
if let Some((span, sugg)) = sugg {
104-
diag.span_suggestion(
105-
span,
106-
"use an inclusive range",
107-
sugg,
108-
Applicability::MaybeIncorrect,
109-
);
110-
}
95+
span_lint_and_then(cx, ALMOST_COMPLETE_RANGE, span, "almost complete ascii range", |diag| {
96+
if let Some((span, sugg)) = sugg {
97+
diag.span_suggestion(span, "use an inclusive range", sugg, Applicability::MaybeIncorrect);
11198
}
112-
);
99+
});
113100
}
114101
}

‎clippy_lints/src/arc_with_non_send_sync.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,21 @@ impl<'tcx> LateLintPass<'tcx> for ArcWithNonSendSync {
6262
ARC_WITH_NON_SEND_SYNC,
6363
expr.span,
6464
"usage of an `Arc` that is not `Send` or `Sync`",
65-
|diag| with_forced_trimmed_paths!({
66-
if !is_send {
67-
diag.note(format!("the trait `Send` is not implemented for `{arg_ty}`"));
68-
}
69-
if !is_sync {
70-
diag.note(format!("the trait `Sync` is not implemented for `{arg_ty}`"));
71-
}
65+
|diag| {
66+
with_forced_trimmed_paths!({
67+
if !is_send {
68+
diag.note(format!("the trait `Send` is not implemented for `{arg_ty}`"));
69+
}
70+
if !is_sync {
71+
diag.note(format!("the trait `Sync` is not implemented for `{arg_ty}`"));
72+
}
7273

73-
diag.note(format!("required for `{ty}` to implement `Send` and `Sync`"));
74+
diag.note(format!("required for `{ty}` to implement `Send` and `Sync`"));
7475

75-
diag.help("consider using an `Rc` instead or wrapping the inner type with a `Mutex`");
76-
}
77-
));
76+
diag.help("consider using an `Rc` instead or wrapping the inner type with a `Mutex`");
77+
});
78+
},
79+
);
7880
}
7981
}
8082
}

0 commit comments

Comments
 (0)
Please sign in to comment.