mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-28 07:51:07 +00:00
Actually span makes more sense on whole function
This commit is contained in:
parent
5342a26fd0
commit
496d8cadd8
@ -1114,7 +1114,7 @@ fn assert_last_param_is_slice(decl: &syn::FnDecl) -> Result<(), Diagnostic> {
|
|||||||
slice, to hold the arguments of unknown length")
|
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::FnArg::Captured(ref arg_cap) = arg.value() {
|
||||||
if let syn::Type::Reference(ref ref_ty) = arg_cap.ty {
|
if let syn::Type::Reference(ref ref_ty) = arg_cap.ty {
|
||||||
if let syn::Type::Slice(_) = *ref_ty.elem {
|
if let syn::Type::Slice(_) = *ref_ty.elem {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user