Skip to content

Commit acd6014

Browse files
committed
Remove hir::Local::attrs.
1 parent 3e721b1 commit acd6014

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/returns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl<'tcx> LateLintPass<'tcx> for Return {
8181
if let Some(stmt) = block.stmts.iter().last();
8282
if let StmtKind::Local(local) = &stmt.kind;
8383
if local.ty.is_none();
84-
if local.attrs.is_empty();
84+
if cx.tcx.hir().attrs(local.hir_id).is_empty();
8585
if let Some(initexpr) = &local.init;
8686
if let PatKind::Binding(.., ident, _) = local.pat.kind;
8787
if let ExprKind::Path(qpath) = &retexpr.kind;

0 commit comments

Comments
 (0)