Skip to content

Commit 1b2f43d

Browse files
committed
Fixes #4835
1 parent 4ad77bd commit 1b2f43d

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

clippy_lints/src/loops.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ fn never_loop_expr(expr: &Expr, main_loop_id: HirId) -> NeverLoopResult {
720720
ExprKind::Struct(_, _, None)
721721
| ExprKind::Yield(_, _)
722722
| ExprKind::Closure(_, _, _, _, _)
723-
| ExprKind::InlineAsm(_, _, _)
723+
| ExprKind::InlineAsm(_)
724724
| ExprKind::Path(_)
725725
| ExprKind::Lit(_)
726726
| ExprKind::Err => NeverLoopResult::Otherwise,

clippy_lints/src/utils/author.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,8 @@ impl<'tcx> Visitor<'tcx> for PrintVisitor {
458458
println!("Ret(None) = {};", current);
459459
}
460460
},
461-
ExprKind::InlineAsm(_, ref _input, ref _output) => {
462-
println!("InlineAsm(_, ref input, ref output) = {};", current);
461+
ExprKind::InlineAsm(_) => {
462+
println!("InlineAsm(_) = {};", current);
463463
println!(" // unimplemented: `ExprKind::InlineAsm` is not further destructured at the moment");
464464
},
465465
ExprKind::Struct(ref path, ref fields, ref opt_base) => {

clippy_lints/src/utils/inspector.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -282,14 +282,16 @@ fn print_expr(cx: &LateContext<'_, '_>, expr: &hir::Expr, indent: usize) {
282282
print_expr(cx, e, indent + 1);
283283
}
284284
},
285-
hir::ExprKind::InlineAsm(_, ref input, ref output) => {
285+
hir::ExprKind::InlineAsm(ref asm) => {
286+
let inputs = &asm.inputs_exprs;
287+
let outputs = &asm.outputs_exprs;
286288
println!("{}InlineAsm", ind);
287289
println!("{}inputs:", ind);
288-
for e in input {
290+
for e in inputs.iter() {
289291
print_expr(cx, e, indent + 1);
290292
}
291293
println!("{}outputs:", ind);
292-
for e in output {
294+
for e in outputs.iter() {
293295
print_expr(cx, e, indent + 1);
294296
}
295297
},

0 commit comments

Comments
 (0)