From 1b2f43d918851be617465fb3ca89322ac2e2d023 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Fri, 22 Nov 2019 13:25:38 +0100 Subject: [PATCH] Rustup to rust-lang/rust#66515 Fixes #4835 --- clippy_lints/src/loops.rs | 2 +- clippy_lints/src/utils/author.rs | 4 ++-- clippy_lints/src/utils/inspector.rs | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/clippy_lints/src/loops.rs b/clippy_lints/src/loops.rs index 75d540b38e5d..31d97d790cba 100644 --- a/clippy_lints/src/loops.rs +++ b/clippy_lints/src/loops.rs @@ -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, diff --git a/clippy_lints/src/utils/author.rs b/clippy_lints/src/utils/author.rs index 71cf6c03e5ca..81a05e50d33b 100644 --- a/clippy_lints/src/utils/author.rs +++ b/clippy_lints/src/utils/author.rs @@ -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) => { diff --git a/clippy_lints/src/utils/inspector.rs b/clippy_lints/src/utils/inspector.rs index 846e47cee374..9376b923bd47 100644 --- a/clippy_lints/src/utils/inspector.rs +++ b/clippy_lints/src/utils/inspector.rs @@ -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); } },