Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Nov 22, 2019
1 parent 4ad77bd commit 1b2f43d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ fn never_loop_expr(expr: &Expr, main_loop_id: HirId) -> NeverLoopResult {
ExprKind::Struct(_, _, None)
| ExprKind::Yield(_, _)
| ExprKind::Closure(_, _, _, _, _)
| ExprKind::InlineAsm(_, _, _)
| ExprKind::InlineAsm(_)
| ExprKind::Path(_)
| ExprKind::Lit(_)
| ExprKind::Err => NeverLoopResult::Otherwise,
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/utils/author.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ impl<'tcx> Visitor<'tcx> for PrintVisitor {
println!("Ret(None) = {};", current);
}
},
ExprKind::InlineAsm(_, ref _input, ref _output) => {
println!("InlineAsm(_, ref input, ref output) = {};", current);
ExprKind::InlineAsm(_) => {
println!("InlineAsm(_) = {};", current);
println!(" // unimplemented: `ExprKind::InlineAsm` is not further destructured at the moment");
},
ExprKind::Struct(ref path, ref fields, ref opt_base) => {
Expand Down
8 changes: 5 additions & 3 deletions clippy_lints/src/utils/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,16 @@ fn print_expr(cx: &LateContext<'_, '_>, expr: &hir::Expr, indent: usize) {
print_expr(cx, e, indent + 1);
}
},
hir::ExprKind::InlineAsm(_, ref input, ref output) => {
hir::ExprKind::InlineAsm(ref asm) => {
let inputs = &asm.inputs_exprs;
let outputs = &asm.outputs_exprs;
println!("{}InlineAsm", ind);
println!("{}inputs:", ind);
for e in input {
for e in inputs.iter() {
print_expr(cx, e, indent + 1);
}
println!("{}outputs:", ind);
for e in output {
for e in outputs.iter() {
print_expr(cx, e, indent + 1);
}
},
Expand Down

0 comments on commit 1b2f43d

Please sign in to comment.