We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
let_underscore
1 parent fed75b3 commit 5332defCopy full SHA for 5332def
clippy_lints/src/let_underscore.rs
@@ -139,9 +139,9 @@ const SYNC_GUARD_PATHS: [&[&str]; 3] = [
139
impl<'tcx> LateLintPass<'tcx> for LetUnderscore {
140
fn check_local(&mut self, cx: &LateContext<'tcx>, local: &LetStmt<'tcx>) {
141
if matches!(local.source, LocalSource::Normal)
142
- && !in_external_macro(cx.tcx.sess, local.span)
143
&& let PatKind::Wild = local.pat.kind
144
&& let Some(init) = local.init
+ && !in_external_macro(cx.tcx.sess, local.span)
145
{
146
let init_ty = cx.typeck_results().expr_ty(init);
147
let contains_sync_guard = init_ty.walk().any(|inner| match inner.unpack() {
0 commit comments