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

feat: Make Visitor bounded by ?Sized #574

Merged
merged 7 commits into from
Sep 11, 2023

Conversation

kdy1
Copy link
Contributor

@kdy1 kdy1 commented Aug 29, 2023

It does not have to be Sized.

Real usage

I'm trying to use lightningcss for some SWC-related projects and I need to create a trait object of Visitor

@kdy1
Copy link
Contributor Author

kdy1 commented Aug 31, 2023

Oops I found that const TYPES: VisitTypes; is now the problem

@devongovett
Copy link
Member

@kdy1 I think we can remove that since there is a visit_types function instead. Most places seem to already use it. If we just make that function required instead it should be ok. The compiler should still be able to inline it if it is constant. https://github.com/parcel-bundler/lightningcss/blob/master/src/visitor.rs#L155

@kdy1
Copy link
Contributor Author

kdy1 commented Sep 2, 2023

I did it

@devongovett devongovett merged commit 0cd7c4c into parcel-bundler:master Sep 11, 2023
3 checks passed
kdy1 added a commit to swc-project/plugins that referenced this pull request Sep 12, 2023
Related PR: parcel-bundler/lightningcss#574

---------

Co-authored-by: 강동윤 (Donny) <kdy1.users.noreply.github.com>
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.

None yet

2 participants