Skip to content

Commit 5332def

Browse files
committed
let_underscore: Delay macro check.
1 parent fed75b3 commit 5332def

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/let_underscore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ const SYNC_GUARD_PATHS: [&[&str]; 3] = [
139139
impl<'tcx> LateLintPass<'tcx> for LetUnderscore {
140140
fn check_local(&mut self, cx: &LateContext<'tcx>, local: &LetStmt<'tcx>) {
141141
if matches!(local.source, LocalSource::Normal)
142-
&& !in_external_macro(cx.tcx.sess, local.span)
143142
&& let PatKind::Wild = local.pat.kind
144143
&& let Some(init) = local.init
144+
&& !in_external_macro(cx.tcx.sess, local.span)
145145
{
146146
let init_ty = cx.typeck_results().expr_ty(init);
147147
let contains_sync_guard = init_ty.walk().any(|inner| match inner.unpack() {

0 commit comments

Comments
 (0)