Skip to content

Use alias instead of attribute to detect duplicate accessors#11

Merged
valsteen merged 1 commit into
mainfrom
fix-issue-7
Jul 24, 2023
Merged

Use alias instead of attribute to detect duplicate accessors#11
valsteen merged 1 commit into
mainfrom
fix-issue-7

Conversation

@valsteen
Copy link
Copy Markdown
Owner

return syn::Error::new(
accessor.span,
format!("Duplicate accessor {}", accessor.ident),
accessor.alias.span(),
Copy link
Copy Markdown
Owner Author

@valsteen valsteen Jul 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accessor.alias will be either the name itself, or the alias if one is provided ; by taking its span, compilation errors with highlight it in both cases

@valsteen valsteen merged commit 6cf144d into main Jul 24, 2023
@valsteen valsteen deleted the fix-issue-7 branch July 24, 2023 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant