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

Optimize when there are multiple variants of the same type #94

Open
taiki-e opened this issue Apr 21, 2020 · 1 comment
Open

Optimize when there are multiple variants of the same type #94

taiki-e opened this issue Apr 21, 2020 · 1 comment
Labels
A-auto_enum Area: #[auto_enum] C-enhancement Category: A new feature or an improvement for an existing one

Comments

@taiki-e
Copy link
Owner

taiki-e commented Apr 21, 2020

#14 (comment)

Another problem is that the current ? operator support generates the same number of variants as the ? operators are used. This may generate code that is less efficient than boxing based error handling for functions that use many ? operators. Since proc_macro doesn't understand types (i.e., it is difficult to optimize that), proc-macro crate, which provides only this feature, it will not be very useful.

I don't know if there is any way to fix this issue at this time.

cc rust-lang/rfcs#2414

@taiki-e taiki-e added the A-auto_enum Area: #[auto_enum] label Apr 21, 2020
@taiki-e
Copy link
Owner Author

taiki-e commented Jun 28, 2020

This is actually a discussion "is there a way to optimize when there are multiple variants of the same type?"

@taiki-e taiki-e changed the title Optimize the ? operator support Optimize when there are multiple variants of the same type Jun 28, 2020
@taiki-e taiki-e added the C-enhancement Category: A new feature or an improvement for an existing one label Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-auto_enum Area: #[auto_enum] C-enhancement Category: A new feature or an improvement for an existing one
Projects
None yet
Development

No branches or pull requests

1 participant