Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checks for conflicts for aliases #2562

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mingun
Copy link
Contributor

@Mingun Mingun commented Aug 8, 2023

  • Check that alias is not the same as name of other field / variant (it still can be the name of owning field / variant)
  • Check that aliases are unique, i. e. two different fields / variants does not use the same alias

It would be better, if error points to corresponding alias, but currently alias spans are not stored anywhere, so I left this to another PR.

Fixes #2308, fixes #2551

- Check that alias is not the same as name of other field (it still can be the name of owning field/variant)
- Check that aliases are unique, i. e. two different fields does not use the same alias
@Mingun
Copy link
Contributor Author

Mingun commented Mar 3, 2024

@dtolnay, @oli-obk, can you give some feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant