Skip to content

Commit a4b413d

Browse files
committed
Add asm label support to AST and HIR
1 parent 31b551f commit a4b413d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

clippy_lints/src/loops/never_loop.rs

+3
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ fn never_loop_expr<'tcx>(
255255
InlineAsmOperand::Const { .. } | InlineAsmOperand::SymFn { .. } | InlineAsmOperand::SymStatic { .. } => {
256256
NeverLoopResult::Normal
257257
},
258+
InlineAsmOperand::Label { block } => {
259+
never_loop_block(cx, block, local_labels, main_loop_id)
260+
}
258261
})),
259262
ExprKind::OffsetOf(_, _)
260263
| ExprKind::Yield(_, _)

clippy_utils/src/hir_utils.rs

+1
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
835835
self.hash_body(anon_const.body);
836836
},
837837
InlineAsmOperand::SymStatic { path, def_id: _ } => self.hash_qpath(path),
838+
InlineAsmOperand::Label { block } => self.hash_block(block),
838839
}
839840
}
840841
},

0 commit comments

Comments
 (0)