Skip to content
New issue

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

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

Already on GitHub? # to your account

[Feature request] Enum variant size hint #12972

Closed
oxalica opened this issue Aug 8, 2022 · 1 comment
Closed

[Feature request] Enum variant size hint #12972

oxalica opened this issue Aug 8, 2022 · 1 comment

Comments

@oxalica
Copy link
Contributor

oxalica commented Aug 8, 2022

It's quite common to write a enum with tons of variants, but have no idea which one bloats the whole enum size.
They are not always easy to estimate when taking padding and size optimization into count.

The type size can be platform dependent. But we could reuse the setting rust-analyzer.cargo.target and rustc --print cfg for the calculation.

@lnicola
Copy link
Member

lnicola commented Aug 8, 2022

Duplicate of #4091, mostly.

@lnicola lnicola marked this as a duplicate of #4091 Aug 8, 2022
@lnicola lnicola closed this as completed Aug 8, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants