Skip to content

Commit 0e527ba

Browse files
committed
Retain assembly operands span when lowering AST to HIR
1 parent 8eca423 commit 0e527ba

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clippy_lints/src/loops.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ fn never_loop_expr(expr: &Expr<'_>, main_loop_id: HirId) -> NeverLoopResult {
768768
ExprKind::InlineAsm(ref asm) => asm
769769
.operands
770770
.iter()
771-
.map(|o| match o {
771+
.map(|(o, _)| match o {
772772
InlineAsmOperand::In { expr, .. }
773773
| InlineAsmOperand::InOut { expr, .. }
774774
| InlineAsmOperand::Const { expr }

clippy_lints/src/utils/hir_utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
517517
}
518518
}
519519
asm.options.hash(&mut self.s);
520-
for op in asm.operands {
520+
for (op, _op_sp) in asm.operands {
521521
match op {
522522
InlineAsmOperand::In { reg, expr } => {
523523
reg.hash(&mut self.s);

clippy_lints/src/utils/inspector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ fn print_expr(cx: &LateContext<'_>, expr: &hir::Expr<'_>, indent: usize) {
293293
println!("{}template: {}", ind, InlineAsmTemplatePiece::to_string(asm.template));
294294
println!("{}options: {:?}", ind, asm.options);
295295
println!("{}operands:", ind);
296-
for op in asm.operands {
296+
for (op, _op_sp) in asm.operands {
297297
match op {
298298
hir::InlineAsmOperand::In { expr, .. }
299299
| hir::InlineAsmOperand::InOut { expr, .. }

0 commit comments

Comments
 (0)