Skip to content

Commit 1048ae2

Browse files
committed
append unused variables with _
1 parent e8fd74a commit 1048ae2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libsyntax/test.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ enum BadTestSignature {
335335
fn is_test_fn(cx: &TestCtxt, i: &ast::Item) -> bool {
336336
let has_test_attr = attr::contains_name(&i.attrs, "test");
337337

338-
fn has_test_signature(cx: &TestCtxt, i: &ast::Item) -> HasTestSignature {
338+
fn has_test_signature(_cx: &TestCtxt, i: &ast::Item) -> HasTestSignature {
339339
let has_should_panic_attr = attr::contains_name(&i.attrs, "should_panic");
340340
match i.node {
341341
ast::ItemKind::Fn(ref decl, _, _, _, ref generics, _) => {
@@ -394,9 +394,9 @@ fn is_test_fn(cx: &TestCtxt, i: &ast::Item) -> bool {
394394
fn is_bench_fn(cx: &TestCtxt, i: &ast::Item) -> bool {
395395
let has_bench_attr = attr::contains_name(&i.attrs, "bench");
396396

397-
fn has_bench_signature(cx: &TestCtxt, i: &ast::Item) -> bool {
397+
fn has_bench_signature(_cx: &TestCtxt, i: &ast::Item) -> bool {
398398
match i.node {
399-
ast::ItemKind::Fn(ref decl, _, _, _, ref generics, _) => {
399+
ast::ItemKind::Fn(ref decl, _, _, _, _, _) => {
400400
// NB: inadequate check, but we're running
401401
// well before resolve, can't get too deep.
402402
decl.inputs.len() == 1

0 commit comments

Comments
 (0)