Commit 15d2066c authored by Robin Freyler's avatar Robin Freyler

[lang2/macro] improve error message for unknown method ink! markers

The error diagnostics can be further improved by showing all occurences of unknown ink! markers in an impl block.
parent 1021aab6
......@@ -386,7 +386,7 @@ impl TryFrom<syn::ImplItemMethod> for ir::Function {
selector: ir::FunctionSelector::from(&method.sig.ident),
}))
}
unknown => Err(format_err!(unknown, "unknown ink! attribute found",)),
_unknown => Err(format_err_span!(attr.span(), "unknown ink! marker",)),
}?;
if kind == ir::FunctionKind::Method {
kind = new_kind;
......@@ -394,7 +394,7 @@ impl TryFrom<syn::ImplItemMethod> for ir::Function {
} else {
Err(format_err_span!(
attr.span(),
"conflicting ink! attribute found",
"conflicting ink! marker",
))
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment