Skip to content

large_enum_variants lint suggests to box variants above a configurable limit #1427

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

Closed
wants to merge 1 commit into from
Closed

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jan 9, 2017

cc @gnieto

fixes #1127
obsoletes #1187

.iter()
.map(|f| {
let ty = cx.tcx.item_type(f.did);
if ty.needs_subst() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be improved by going into the type and figuring out the sizes of the nongeneric parts.

@oli-obk oli-obk closed this Jan 30, 2017
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.

Suggest to store large enum variants as Box
1 participant