From dfbd2b3457f60efe0a30974dd9eaadb8243a34e3 Mon Sep 17 00:00:00 2001 From: naskya Date: Tue, 16 Jul 2024 16:40:18 +0900 Subject: [PATCH] chore: improve error span --- crates/relax-macros/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/relax-macros/src/lib.rs b/crates/relax-macros/src/lib.rs index 079a3b1..c2e6b82 100644 --- a/crates/relax-macros/src/lib.rs +++ b/crates/relax-macros/src/lib.rs @@ -19,13 +19,13 @@ fn derive_impl(input: syn::DeriveInput) -> syn::Result { if relax_attrs.is_empty() { return Err(syn::Error::new_spanned( - input, + input.ident, "expected #[relax(StructName)] attrubute", )); } if relax_attrs.len() > 1 { return Err(syn::Error::new_spanned( - input, + input.ident, "expected only one #[relax(StructName)] attrubute on top of the struct", )); }