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

Remove IntoIn<'a, Atom<'a>> bounds from AstBuilder methods #154

Open
overlookmotel opened this issue Dec 17, 2024 · 1 comment
Open

Remove IntoIn<'a, Atom<'a>> bounds from AstBuilder methods #154

overlookmotel opened this issue Dec 17, 2024 · 1 comment

Comments

@overlookmotel
Copy link

Many AstBuilder methods take an IntoIn<'a, Atom<'a>> where an Atom is required. This was intended to give flexibility, but it makes it too easy to accidentally copy existing Atoms and make duplicate copies of them in arena, when could just use the original Atom.

e.g. oxc-project/oxc#7969

Make AstBuilder methods just take Atom<'a>, and make user generate the Atom themselves. Usually they'll find they don't have to, because they have an existing Atom already.

@overlookmotel
Copy link
Author

Related: #155.

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

No branches or pull requests

1 participant