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

StrStyle does not implement common traits #1561

Closed
madsmtm opened this issue Dec 28, 2023 · 3 comments
Closed

StrStyle does not implement common traits #1561

madsmtm opened this issue Dec 28, 2023 · 3 comments

Comments

@madsmtm
Copy link

madsmtm commented Dec 28, 2023

It seems like syn::StrStyle does not implement the common traits Clone, Copy, Debug, PartialEq, Eq and Hash. Is this intentional, or an oversight?

@dtolnay
Copy link
Owner

dtolnay commented Dec 31, 2023

StrStyle is vestigial as far as I can tell. It does not appear as a field in any syntax tree data structures, or in any public function signatures. Did you have a use case that benefits from using syn::StrStyle as opposed to your own enum?

Most likely we planned to add impl LitStr { pub fn style(&self) -> StrStyle } at some point but never found a use for it.

@madsmtm
Copy link
Author

madsmtm commented Jan 2, 2024

Did you have a use case that benefits from using syn::StrStyle as opposed to your own enum?

Nope, I don't actually use it, I just spotted it in passing.

@dtolnay
Copy link
Owner

dtolnay commented Jan 2, 2024

Great!

I'll plan to delete StrStyle in the next version. #1566

@dtolnay dtolnay closed this as completed Jan 2, 2024
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

2 participants