From 496d8cadd87d7f38a7ea2f05753982dc867815c6 Mon Sep 17 00:00:00 2001 From: Richard Dodd Date: Tue, 21 Aug 2018 13:12:25 +0100 Subject: [PATCH] Actually span makes more sense on whole function --- crates/macro-support/src/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/macro-support/src/parser.rs b/crates/macro-support/src/parser.rs index 5fc0c05f..dd52bc3c 100644 --- a/crates/macro-support/src/parser.rs +++ b/crates/macro-support/src/parser.rs @@ -1114,7 +1114,7 @@ fn assert_last_param_is_slice(decl: &syn::FnDecl) -> Result<(), Diagnostic> { slice, to hold the arguments of unknown length") } - let arg = decl.inputs.last().ok_or_else(|| not_slice_error(&decl.inputs))?; + let arg = decl.inputs.last().ok_or_else(|| not_slice_error(&decl))?; if let syn::FnArg::Captured(ref arg_cap) = arg.value() { if let syn::Type::Reference(ref ref_ty) = arg_cap.ty { if let syn::Type::Slice(_) = *ref_ty.elem {