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.
1 parent 3e721b1 commit acd6014Copy full SHA for acd6014
clippy_lints/src/returns.rs
@@ -81,7 +81,7 @@ impl<'tcx> LateLintPass<'tcx> for Return {
81
if let Some(stmt) = block.stmts.iter().last();
82
if let StmtKind::Local(local) = &stmt.kind;
83
if local.ty.is_none();
84
- if local.attrs.is_empty();
+ if cx.tcx.hir().attrs(local.hir_id).is_empty();
85
if let Some(initexpr) = &local.init;
86
if let PatKind::Binding(.., ident, _) = local.pat.kind;
87
if let ExprKind::Path(qpath) = &retexpr.kind;
0 commit comments