From 1048ae29a11f5e4ee188dde0d3ba39be2b05d8ed Mon Sep 17 00:00:00 2001 From: dylan_DPC Date: Wed, 6 Jun 2018 12:22:38 +0530 Subject: [PATCH] append unused variables with _ --- src/libsyntax/test.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libsyntax/test.rs b/src/libsyntax/test.rs index 2d5606b2edeb..0c7f70a578a2 100644 --- a/src/libsyntax/test.rs +++ b/src/libsyntax/test.rs @@ -335,7 +335,7 @@ enum BadTestSignature { fn is_test_fn(cx: &TestCtxt, i: &ast::Item) -> bool { let has_test_attr = attr::contains_name(&i.attrs, "test"); - fn has_test_signature(cx: &TestCtxt, i: &ast::Item) -> HasTestSignature { + fn has_test_signature(_cx: &TestCtxt, i: &ast::Item) -> HasTestSignature { let has_should_panic_attr = attr::contains_name(&i.attrs, "should_panic"); match i.node { ast::ItemKind::Fn(ref decl, _, _, _, ref generics, _) => { @@ -394,9 +394,9 @@ fn is_test_fn(cx: &TestCtxt, i: &ast::Item) -> bool { fn is_bench_fn(cx: &TestCtxt, i: &ast::Item) -> bool { let has_bench_attr = attr::contains_name(&i.attrs, "bench"); - fn has_bench_signature(cx: &TestCtxt, i: &ast::Item) -> bool { + fn has_bench_signature(_cx: &TestCtxt, i: &ast::Item) -> bool { match i.node { - ast::ItemKind::Fn(ref decl, _, _, _, ref generics, _) => { + ast::ItemKind::Fn(ref decl, _, _, _, _, _) => { // NB: inadequate check, but we're running // well before resolve, can't get too deep. decl.inputs.len() == 1